Hi J2EE experts,
I've been working in a j2ee/ejb based applicacion and I've some questions related to the server's container and application management. There are my questions:
1. Can I do local calls between diferents EJBs in differents EARs/applications but in the same container or only remotes calls ?
2. Are the jndi names directory entries for the entire server container or only for application ?
this question is oriented mainly if a can have a EJB object in EJBModule1 in a specific EAR with the jndi name ejb/AccountEjb, and another EJB object in another module (EJBModule2) in another EAR with the same jndi name) of course in the same container.
What will happen with this situation ?
thanks for your advise
-
JNDI directory and EJB local/remote calls (2 messages)
- Posted by: DA
- Posted on: July 18 2005 12:24 EDT
Threaded Messages (2)
- JNDI directory and EJB local/remote calls by Viktor Sadovnikov on July 20 2005 02:56 EDT
- JNDI by Steven Peh on July 24 2005 22:13 EDT
-
JNDI directory and EJB local/remote calls[ Go to top ]
- Posted by: Viktor Sadovnikov
- Posted on: July 20 2005 02:56 EDT
- in response to DA
Interesting questions... Page 54 of EJB 2.1 spec includes the following:A local client is a client that is collocated in the same JVM with the session or entity bean that provides the local client view and which may be tightly coupled to the bean. A local client of a session bean or an entity bean may be another enterprise bean (a session bean, entity bean, or message-driven bean) or a web component.
It makes me thinking that you can do local calls between the EJBs in different applications (I know for sure that WebSphere has one JVM for entire server).
How do you do the calls? The difference will be only in the JNDI name used during lookup. I would expect the EJB reference name to be prefixed by the name of another application. The separator will be either "/" or "#" -
JNDI[ Go to top ]
- Posted by: Steven Peh
- Posted on: July 24 2005 22:13 EDT
- in response to DA
2. Are the jndi names directory entries for the entire server container or only for application ?
The jndi names should be unique the entire server container.this question is oriented mainly if a can have a EJB object in EJBModule1 in a specific EAR with the jndi name ejb/AccountEjb, and another EJB object in another module (EJBModule2) in another EAR with the same jndi name) of course in the same container. What will happen with this situation ? thanks for your advise
Same jndi name would not work, the second ear, when deployed would probably get a jndi binding error, unless the container has its own extensions to handle this.