Instantly share code, notes, and snippets.

Embed
What would you like to do?
55thAirhacksQ&A.md
@AdamBien

This comment has been minimized.

Show comment
Hide comment
@AdamBien

AdamBien Sep 4, 2018

Overflow questions from the 55th episode:

Managing docker build with Maven?: http://adambien.blog/roller/abien/entry/simplest_possible_microprofile_maven_kickstarter

Owner

AdamBien commented Sep 4, 2018

Overflow questions from the 55th episode:

Managing docker build with Maven?: http://adambien.blog/roller/abien/entry/simplest_possible_microprofile_maven_kickstarter

@AdamBien

This comment has been minimized.

Show comment
Hide comment
Owner

AdamBien commented Sep 4, 2018

@AdamBien

This comment has been minimized.

Show comment
Hide comment
Owner

AdamBien commented Sep 4, 2018

@AdamBien

This comment has been minimized.

Show comment
Hide comment
@AdamBien

AdamBien Sep 4, 2018

@AdamBien Hi, adam, Is there a way to externalize the calculation of a mathematics formula in a way that you can change it later. thanks

— omar Alvarez (@denpile) September 3, 2018
Owner

AdamBien commented Sep 4, 2018

@AdamBien Hi, adam, Is there a way to externalize the calculation of a mathematics formula in a way that you can change it later. thanks

— omar Alvarez (@denpile) September 3, 2018
@jumarome

This comment has been minimized.

Show comment
Hide comment
@jumarome

jumarome Sep 7, 2018

Hi Adam, first of all thank you for the great job you are doing for the java community. my questions are:

  1. If you are involved in a project in which you have to do a lot of CRUD operations, up to what point is acceptable to include the deltaspike jpa module dependency?

  2. How would be the best way to handle partial updates via PATCH on a JAX-RS resource(assuming that the client doesn't want to implement JSON PATCH spec), specifically how can I determine when the client sends null explicitly in a field or when is omitting a field? If I use a HashMap or a JsonObject on the request body the problem is that I lose the validation annotations that I put in the entity,enum converters and also LocalDate/LocalDateTime converters.

Thanks

jumarome commented Sep 7, 2018

Hi Adam, first of all thank you for the great job you are doing for the java community. my questions are:

  1. If you are involved in a project in which you have to do a lot of CRUD operations, up to what point is acceptable to include the deltaspike jpa module dependency?

  2. How would be the best way to handle partial updates via PATCH on a JAX-RS resource(assuming that the client doesn't want to implement JSON PATCH spec), specifically how can I determine when the client sends null explicitly in a field or when is omitting a field? If I use a HashMap or a JsonObject on the request body the problem is that I lose the validation annotations that I put in the entity,enum converters and also LocalDate/LocalDateTime converters.

Thanks

@dempile

This comment has been minimized.

Show comment
Hide comment
@dempile

dempile Sep 12, 2018

Hi Adam
An Application for a large population have to be efficient I want to know the maximum operation by second ( in parallel ) my application could handle and the number of maximum users in parallel, ,
how can I perform a test like this ( Iam using Payara ) ?
Thanks

dempile commented Sep 12, 2018

Hi Adam
An Application for a large population have to be efficient I want to know the maximum operation by second ( in parallel ) my application could handle and the number of maximum users in parallel, ,
how can I perform a test like this ( Iam using Payara ) ?
Thanks

@avdiu

This comment has been minimized.

Show comment
Hide comment
@avdiu

avdiu Sep 12, 2018

Hi Adam,

I have recently bought your online workshops (Bootstrap and Effective JavaEE) - currently at bootstrap section, I saw that you never mention servlets and in youtube in your videos you often use javascript to call java ee backend (jax-rs). Can you explain how can I make an application that make use of session (eg. HttpSession in Java), handle clients requests but also use Rest. Should I go for Client->Servlet->JAX-RS or what are best practices?

Or If you could explain a little bit more about how to build modern webapp, how are servlets used these days or are they dead?!
Sorry if questions are "outdated " 😄 Im kind of new in java ee!

Thanks

avdiu commented Sep 12, 2018

Hi Adam,

I have recently bought your online workshops (Bootstrap and Effective JavaEE) - currently at bootstrap section, I saw that you never mention servlets and in youtube in your videos you often use javascript to call java ee backend (jax-rs). Can you explain how can I make an application that make use of session (eg. HttpSession in Java), handle clients requests but also use Rest. Should I go for Client->Servlet->JAX-RS or what are best practices?

Or If you could explain a little bit more about how to build modern webapp, how are servlets used these days or are they dead?!
Sorry if questions are "outdated " 😄 Im kind of new in java ee!

Thanks

@mistifi01

This comment has been minimized.

Show comment
Hide comment
@mistifi01

mistifi01 Sep 16, 2018

Hello Adam

  1. I've read a little bit about javax.MVC lately and I really liked it (I think java ee missed a framework like this because everybody keep shouting at Spring MVC when comparing Java EE and Spring), but I am somehow confused with it! It says in spec that is built using jax-rs and if you start a mvc project you need to configure, and extends Application just as an JAX-RS app. Can I use JAX-RS resource in same project with mvc?!
    What I mean is for eg. I configured JAX-RS under path /api/ , so can I make an @controller class javax.Mvc and another one TestResource (restful)!!
    Or should I make another project just for REST Resources and call those api from my other mvc project
    I am confused!! Help me Adam 😆 😆

  2. Have you any knowledge about what's going on with this MVC framework, is there gonna be any update on it? Is it safe to create projects from scratch using

Thank you for all of this that you are doing (answering everybody questions and helping us for free)

mistifi01 commented Sep 16, 2018

Hello Adam

  1. I've read a little bit about javax.MVC lately and I really liked it (I think java ee missed a framework like this because everybody keep shouting at Spring MVC when comparing Java EE and Spring), but I am somehow confused with it! It says in spec that is built using jax-rs and if you start a mvc project you need to configure, and extends Application just as an JAX-RS app. Can I use JAX-RS resource in same project with mvc?!
    What I mean is for eg. I configured JAX-RS under path /api/ , so can I make an @controller class javax.Mvc and another one TestResource (restful)!!
    Or should I make another project just for REST Resources and call those api from my other mvc project
    I am confused!! Help me Adam 😆 😆

  2. Have you any knowledge about what's going on with this MVC framework, is there gonna be any update on it? Is it safe to create projects from scratch using

Thank you for all of this that you are doing (answering everybody questions and helping us for free)

@romankmq

This comment has been minimized.

Show comment
Hide comment
@romankmq

romankmq Sep 16, 2018

Hi Adam

What do you think which is better, faster and more modern for today's web Apps : Servlets & JSP, JSF, Vaadin?
And can you tell me if there are any other good frameworks?
Thanks

romankmq commented Sep 16, 2018

Hi Adam

What do you think which is better, faster and more modern for today's web Apps : Servlets & JSP, JSF, Vaadin?
And can you tell me if there are any other good frameworks?
Thanks

@thearonbb

This comment has been minimized.

Show comment
Hide comment
@thearonbb

thearonbb Sep 16, 2018

Hey Adam,

  1. How do I handle concurrency in JPA, @Version (if you can explain little bit) or I saw some discussions that even JMS Queue is a good to go? What do you think or there is another better solution for this?

  2. Which JPA provider do you use Hibernate or EclipseLink?

Thanks

thearonbb commented Sep 16, 2018

Hey Adam,

  1. How do I handle concurrency in JPA, @Version (if you can explain little bit) or I saw some discussions that even JMS Queue is a good to go? What do you think or there is another better solution for this?

  2. Which JPA provider do you use Hibernate or EclipseLink?

Thanks

@mistifi01

This comment has been minimized.

Show comment
Hide comment
@mistifi01

mistifi01 Sep 17, 2018

Hi Adam

How to optimize Java EE with only jdbc (without JPA). For eg. if I have an SomethingDAO and in that class I have all Connection.class, methods that do inserts, deletes, updates and all work with database (with plain SQL queries, maybe calling stored procedures)! Should I inject that class in EJB, JAX-RS? How would EJB transaction deal with it?

And do you think that doing this is a good call (jdbc over jpa). I mean if you want full control over code because these frameworks have added so much features that maybe something is not necessary (and just losing time to do something that I don't really need it)??

Thanks

mistifi01 commented Sep 17, 2018

Hi Adam

How to optimize Java EE with only jdbc (without JPA). For eg. if I have an SomethingDAO and in that class I have all Connection.class, methods that do inserts, deletes, updates and all work with database (with plain SQL queries, maybe calling stored procedures)! Should I inject that class in EJB, JAX-RS? How would EJB transaction deal with it?

And do you think that doing this is a good call (jdbc over jpa). I mean if you want full control over code because these frameworks have added so much features that maybe something is not necessary (and just losing time to do something that I don't really need it)??

Thanks

@varianti2

This comment has been minimized.

Show comment
Hide comment
@varianti2

varianti2 Sep 19, 2018

Hi Adam
I am building an web app. using java ee and idea is based mainly to schedule some tasks that my app offer from different users! For eg. user select what to schedule and after button click I want to perform some database operations and call @singleton methods for scheduling.
How would be best solution if you have thousands to tens of thousands of users... Should you use only one singleton (would it be efficient? fast? not hardwork for application server etc) or what to do? And for database operations eg insert the data of schedule task into user history... is a good idead to do this as asynchronus ?
If you can tell me the best way to do this?

Thanks

varianti2 commented Sep 19, 2018

Hi Adam
I am building an web app. using java ee and idea is based mainly to schedule some tasks that my app offer from different users! For eg. user select what to schedule and after button click I want to perform some database operations and call @singleton methods for scheduling.
How would be best solution if you have thousands to tens of thousands of users... Should you use only one singleton (would it be efficient? fast? not hardwork for application server etc) or what to do? And for database operations eg insert the data of schedule task into user history... is a good idead to do this as asynchronus ?
If you can tell me the best way to do this?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment