Posted By:
Ryan_Wang
Posted On:
Tuesday, October 18, 2005 05:44 AM
I have two separate OC4J containers with identical code deployed to both. I want to call some code on one container from the other. All code is in the form of EJBs. I firstly have to do a JNDI lookup: InitialContext context = new InitialContext(); Object ref = context.lookup("jndiNameOfRemoteEJB"); I can then perform the appropriate casts to get the remote ejb object I need. My questions are: 1) Where and how do I initially register the "jndiNameOfRemoteEJB" with the EJB in the registry? 2) When I have identical code deployed to both containers (with the same deployment descriptors) how does it know
More>>
I have two separate OC4J containers with identical code deployed to both.
I want to call some code on one container from the other. All code is in the form of EJBs.
I firstly have to do a JNDI lookup:
InitialContext context = new InitialContext();
Object ref = context.lookup("jndiNameOfRemoteEJB");
I can then perform the appropriate casts to get the remote ejb object I need.
My questions are:
1) Where and how do I initially register the "jndiNameOfRemoteEJB" with the EJB in the registry?
2) When I have identical code deployed to both containers (with the same deployment descriptors) how does it know which container's code should be executed? When I do a lookup for an EJB, how can I be sure it has looked up the EJB in the correct container?
<<Less