It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes One EJB 3.0 Container vs more than one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "One EJB 3.0 Container vs more than one" Watch "One EJB 3.0 Container vs more than one" New topic

One EJB 3.0 Container vs more than one

Bane Devrnja

Joined: Feb 02, 2012
Posts: 2
Adam Bien in his "Real World Java EE Patterns" on page 34 says:
"You have to be aware of nature of distribution, per-value and per-reference semantics, and exception handling. You have another option - don't distribute your system. Deployment of entire application to a single JVM solves the challenges in an elegant way - the fallacies of distributed computing doesn't apply any more.The system isn't distributed; you can work with objects in transparent way. You can partially achieve that even with Jave EE 5 - you can run as many layers as possible in a single process."
So it is possible to have presentation layer (JSF) in EJB 3.0 container and enterprise beans deployed in same container exposing/using only @Local interfaces.
But when some components are distributed on say two containers - are the components registered in java:comp/env namespace also visible on another container? Or is this is specific to container how to link the beans in a remote container? Is there a difference in this respect between EJB 3.0 and 3.1 container?
I found (Enterprise JavaBeans 3.0 - page 34) :"The <ejb-ref> can be linked to specific EJB container by using <ejb-link> element." Still it is unclear how is it achieved - is there some global name that is visible via JNDI outsade the container an can be seen by another container which needs to reference that component, and then <ejb-link> should have that 'global' name that other container exposes?
I agree. Here's the link:
subject: One EJB 3.0 Container vs more than one
jQuery in Action, 3rd edition