Bart Kummel wrote:I was wondering what you think of using Entities: should we use them only in the "Model" layer and use DAO's (or something similar) in the "View/Controller"-layer? Or do you think it is okay to pass them through the service facade and just use the same Entity objects throughout the entire application? Or do you think this choice should depend on the size of the application or maybe some other metric?
Pedro Kowalski wrote:
Does the CDI's @ApplicationScoped solve the problem of multi-node (multi-JVM) environment and preserves only one instance for all JVM's?
Pedro Kowalski wrote:
Jan Groth wrote:More and more voices are heard that EJB might completely drop out of future JEE specs.
Could you give any source of these voices?
Pedro Kowalski wrote:
However, I am -- just like you -- quite interested how you can (if it's possible!) achieve the multi-node environment singleton...
JSR 299 wrote:
There are several ways to ensure that the singleton bean remains a singleton when its client gets serialized:
have the singleton bean implement writeResolve() and readReplace() (as defined by the Java serialization specification),
make sure the client keeps only a transient reference to the singleton bean, or
give the client a reference of type Instance<X> where X is the bean type of the singleton bean.
A fourth, better solution is to instead use @ApplicationScoped, allowing the container to proxy the bean, and take care of serialization problems automatically.
My whole point is, you are complaining that a book, which says that it focuses on technology X, isn't covering technology Y.
Jayr Motta wrote:Totally +1, I agree with everything you said, I'm studying to the EJB exam and I've read the "Enterprise Java Beans" from Andrew Lee and Bill Burke, also read the "EJB3 in Action" from Debu, Reza and Derek and they're almost the same.
Despite the little new additions and modifications, there are no information about any of this that you've said (in fact, I would appreciate if you send me some links about it), neither on the specifications itself, that sounds more like improvements than the new "EE6 style".
Mr. Richard, how about some additions there to make your book the best and only on this that Jan quoted? I'll help to spread it if you add those and also buy a copy (even already having some goods about the theme).
Jaikiran Pai wrote:Remember that EJB3.1 can be used and is being used effectively, even without CDI in picture.