Scheduler, DataSources, Microservices, JSF and JS, Beeing Optimismtic or Questions For the 8th airhacks.tv
Lets start with some news first: airhacks Q & A got a dedicated website http://airhacks.tv with an archive of the past shows.
Now to the questions for the November (3rd November, Monday, 6 P.M. CET) edition of the http://airhacks.tv show:
- Question about ejb scheduler vs java ee batch processing. What are pros and cons when using batch processing over ejb scheduler ? Marek
- Question about multi datasource and EJB. What is the best way to deal with EJBs
which need to use a specific database for caller/user? Should I use
Interceptors? Should I use injection with request scoped? Wesley
- Statement: “You forgot to say one advantage of Spring over JEE. Spring you can deploy on any container.” Mauricio
- ‘How do you manage deployed microservices (status, healthchecks, restarting) locally and on servers?’ Tomek
- ’How do you use Docker (what setup) locally and on servers? Tomek
- Why It Is Impossible To Automatically Handle javax.persistence.OptimisticLockException? “…I had even more finding on optimisticLockException. I had encounter this
exception and my solution was pretty straight forward which was just retry and
it works fine with my design and the data were good. The catch is, recently I added a new table which has a relationship to the row
which was throwing the optimisticLockException. I noticed that the entry in the second table was not created because of this exception. However the record data consistency was maintained because of the retry. But I loose an important
information in my related table. Does anyone have suggestion on what to do with this kind of scenario?…” [Anuj]
- can you share some updates on how to do high availability JEE apps in light of
JEE7 and tackling session stored data Ahmed
- We will also cover the extensive gist comments
Do you have any additional questions? Ask now, or wait a month :-)
The best of all: you can ask the questions live, during the show using the chat: http://www.ustream.tv/channel/adambien, twitter (hashtag "#airhacks") or (the best option): using channel ##airhacks on http://freenode.net.
See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.
See you at Java EE Workshops at Munich Airport, Terminal 2 or on demand and in a location very near you: airhacks.io!
I have a few questions that i hope you can answer:
1. How to implement a MVC using jax-rs as the controller?
2. OpenJPA vs Hibernate vs EclipseLink, is there any big different between them (performance, stability and etc)
3. NoSQL, what is more preferable, using native driver or using JPA frameworks like Hibernate OGM?
4. You said that on a boring enterprise projects it is preferable using just one monolithic project but in a startup projects this is not always the case and a multi module project is needed can you please elaborate on what kind of projects? and maybe give a code example of a multi module project.
Posted by Eyal on October 31, 2014 at 11:06 AM CET #
I have also a question:
You have already talked sometimes about microservices and a RESTful communications.
How does a RESTful communication looks like referred to the payload? Do you have shared DTOs / shared domain model package? How let you know the client of a RESTful communication about the data structure?
PS: I'm thinking in product development (not projects), where a single services should also be replaceable with a different implementation.
Posted by Matthias on November 01, 2014 at 09:42 AM CET #
I have one question. Where to put business logic (operations on database etc.) when we use in project both JAX-RS and JSF (which doesn't use rest)?
Posted by Grzegorz on November 01, 2014 at 09:43 AM CET #
long time no speak - so here is my question:
Is there an official way to let a JCA 1.6 ResourceAdapter register any kind of Object in to the JNDI Regsitry to let applications lookup these objects?
I know, there is administered object in the ra.xml. But is there a more programmatic way to do this?
Background: A CCI-style Resource-Adapter will interact with an EIS. When bootstraping the RA, the EIS is requested about the available functions. These functions should be registered as InteractionSpecs in JNDI, so that a lookup can be made:
For now, there is no standard way for a resource adapter. In Glassfish, I can use InitialContext but can't do this in Tomee/Geronimo -> the fallback is to unpack the rar, modify the ra.xml with new <adminobjects> sections and repack+redeploy the rar everytime the EIS changes it's functionality.
Do you have a glue?
Thanks a lot and kind regards,
Posted by Robert on November 01, 2014 at 03:18 PM CET #
reposting a question which obviously got lost :)
How do you handle transforming entities with OneToMany relationships to XML or Json for JAX-RS? I receive a lazyinitializationexception from hibernate. I was able to overcome this problem with the use of jackson-datatype-hibernate dependency, but it works only for json. What about XML? I am aware I could use @XmlTransient, but I don't want that. I want to be able to use the same entity for getAll() (only entity without fetch) and getAllFetched() services.
Posted by Mougli on November 03, 2014 at 02:39 PM CET #
I have recently read this article: http://antoniogoncalves.org/2014/05/25/switch-datasource-with-cdi-alternatives-and-stereotypes/
With CDI, is it possible to choose a database dynamically according to the running context, and not statically like in this article? For instance, choose a remote database if the computer is connected to the Internet or a local one if it is not connected?
Else, which solution would you advise?
Posted by Richard on November 03, 2014 at 05:59 PM CET #
Thanks for an answering my questions.
Regarding for question 4, you said these things on the 33rd degree conference video you uploaded.
I know you didn't have the time to show an example during the airhacks show but maybe now you can do a quick video on multi module project?
Posted by Eyal on November 05, 2014 at 08:25 AM CET #
Where can I watch this show now?
Posted by javaservant on November 05, 2014 at 11:02 AM CET #