Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
30thAirhacksQ&A.md
@walu-lila

This comment has been minimized.

Copy link

walu-lila commented Aug 10, 2016

Hi Adam,

  1. Do you use the JMS provider contained in the application server or do you run a separate JMS server application?
  2. How to use MDBs to listen to AMQP 1.0 Queues?

Thanks.

@tonda100

This comment has been minimized.

Copy link

tonda100 commented Aug 10, 2016

Hi Adam,

Where do you keep the enviroment specific configuration e.g. url and credentials to access external system? Database seems to be the simplest solution, but what if you do not have database? JNDI naming bindings and access it via @resource, but the change requires the application restart? Anything else?

Thanks Antonin

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 10, 2016

Hi Adam,

how do you suggest to stresstest websocket endpoints?

There are several possibilities, all with some disadvantages:

  1. developing a dedicated Stresstest Client with Plain-Old-Concurrency by my own. Which is a huge task I guess.
  2. Using JMeter with Websocket-Extension. Which is some kind of buggy and awefull to handle more than 200 Threads.
  3. There's a tool called "Autobahntestsuite". Do you have experience in this tool?

And there is a little idea to solve this use case:

What about implementing a little servlet with a websocket client inside the doGet method and then using Apache Benchmark to metric this servlet...

What do you suggest?

Thx+Regards,
Robert

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 10, 2016

Hi Adam,

which JDK do you use to build Docklands? In the build.js there is $EXEC(cmd, System.in, System.out, System.err) but this won't work with nashorn full version 1.8.0_102-b14 neither by running build.js directly nor via jjs -scripting build.js.

Instead I have to use print($EXEC(cmd, java.lang.System.in)); which prints the output after the process has finished.

Is there any hint or any switch I have to use for $EXEC to work as in your examples?

Thx+Regards,
Robert

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 10, 2016

Hi Adam,

can you please explain or give an example of how to use javax.enterprise.concurrent.ContextService?

Thx+Regards,
Robert

@tnsasse

This comment has been minimized.

Copy link

tnsasse commented Aug 10, 2016

Hi Adam,

what is your take on DTOs in JAX-RS boundaries? I often feel that my model objects are not suitable for the public boundary, as they might contain properties I wouldn't want to risk being exposed. Simple example imagine a GET /user/id/1. The user model class might contain a password field which you don't want to expose to clients, or it might have a trail of embedded objects like Orders or whatever that you would rather like to expose on a different interface and not have it serialized with User.

Two strategies come to my mind, which both lack in elegance for my taste:

  1. Annotate the model with something the JSON Provider (or whatever) understands like @JsonIgnore to explicitly rule those fields out of landing in the boundaries input/output. This would also entail that you entirely rely on the library to work correctly or in my example you'd run into the risk of spilling passwords.
  2. Create DTOs that only contain the subset of fields you want to see in your boundary. That in turns leads to issues with converting to and from the model object. I tend to write a huge pile of myDto.setA(myModel.getA()) which is error prone and not elegant at all. Other solutions are automated mapping frameworks like Dozer which in turn brings in another dependency and possible problems.

Is there anything obvious that I miss or a pattern to use?
Thanks!

@MauF

This comment has been minimized.

Copy link

MauF commented Aug 23, 2016

Ciao Adam,

I saw that you are going to do some workshops about Angular2 and React.
Recently I did some investigations in order to understand which technology to use in our company, and seems this two philosophies are all but "Standard".

For instance they don't follow the specification of web components (at least they are not compatible)

Other framework like aurelia, polymer and ember seems to be more "standard friendly"

(By the way I find aurelia 10 times more productive that angular2, but this is just my personal opinion...)

What do you think about it?
Do you think that would be better to adopt something that embrace the "web component standard specification" or is better to follow who is more "popular" (and so probably they will become the "new standard")?

Danke schön,
Maurizio

@amkuipers

This comment has been minimized.

Copy link

amkuipers commented Aug 24, 2016

Suppose a JEE6 entity has a setter and getter, that converts/deconverts the parameter before setting the member. So in the db the converted value is stored, and service methods work with the original value. The conversion depends on a JNDI setting. So the getter/setter are calling static methods to retrieve that setting from JNDI.

It works, but junits on service methods with easymock are not looking nice. I'd prefer to inject a JNDI-register singleton in the entity, or use an interceptor (injected with the JNDI-register singleton) on the getter/setter for conversion, or use an entitylistener (injected with the JNDI-register singleton), a produces to inject the entity, etcetera. Just to get rid of the static methods. I also dont want to code the conversion in my business methods.

Let's assume the conversion uses a JNDI number to xor the value. So the DBA only sees the xorred values.
What are your thoughts on this case?

@marcincembrzynski

This comment has been minimized.

Copy link

marcincembrzynski commented Aug 24, 2016

Do you think is secure to store anonymous user data, for example id of the user basket in secure cookie:

NewCookie cookie = new NewCookie("basketId", id, "/", "host", "", 99999, true, true);

Thanks,
Marcin

@alameen

This comment has been minimized.

Copy link

alameen commented Aug 26, 2016

Hello Adam,

What reporting library would you recommend for a Javaee app in which a lot of PDF is being generated? I currently use JasperReport which breaks glassfish whenever the report gets bulky.

Many thanks and keep up the good work :)

@AdamBien

This comment has been minimized.

Copy link
Owner Author

AdamBien commented Aug 29, 2016

@AdamBien why does haproxy need a Java/CentOS Base image? I'd hardly call this minimalistic!

— Christoph Kutzinski (@kutzi) August 26, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@AdamBien

This comment has been minimized.

Copy link
Owner Author

AdamBien commented Aug 29, 2016

@AdamBien

This comment has been minimized.

Copy link
Owner Author

AdamBien commented Aug 29, 2016

TIL: I can use JUnit based system tests in JMeter to do basic smoke test on performance issues in Java EE based systems. Thanks @AdamBien

— Hans Kruse (@hanskruse) August 14, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@AdamBien

This comment has been minimized.

Copy link
Owner Author

AdamBien commented Aug 29, 2016

Wondering what @AdamBien thinks about @myfear's Nine 'Neins' against Java EE for microservices? https://t.co/ENvPlqr0TS

— Hans Kruse (@hanskruse) August 10, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@AdamBien

This comment has been minimized.

Copy link
Owner Author

AdamBien commented Aug 29, 2016

@AdamBien @hanskruse no wonder, I'm sure #Cobol advocates find their happy clients just as fine

— Kristof Jozsa (@kjozsa) August 12, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@jhogan515

This comment has been minimized.

Copy link

jhogan515 commented Aug 29, 2016

What is the current state of ESB, and will it or something like it become part of JEE? It seems that the popularity of SOA and microservices has caused a void area in the architectures of a lot of companies. Companies end up with very large collections of services with all pointing at the same things. The proliferation of services (possibly excessive) seems to create lots of redundant configuration, and I believe it makes it a lot more difficult for developers to comprehend different parts of systems. Maybe a more standardized ESB would help ...?

@t-shaguy

This comment has been minimized.

Copy link

t-shaguy commented Sep 1, 2016

Hi Adam,

Many thanks for this great work. Please are connection pools more reliable than CMP/ Application Server Data-sources in enterprise applications, Please what is your best practice advise as regards this?

@t-shaguy

This comment has been minimized.

Copy link

t-shaguy commented Sep 1, 2016

Hi Adam,
Please are there times, where running / exposing a web service on the JVM are more robust / better than on an application Server say wildfly or Payara ... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.