File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JNDI - Bind two applications 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 "JNDI - Bind two applications" Watch "JNDI - Bind two applications" New topic
Author

JNDI - Bind two applications

Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
I've got EJBs deployed in separate applications.
How do you lookup an EJB in another application as the both have there own JNDI context?

An normal client or EJB would do something like:


But that is in a single application context

Thanks

Kris
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Exact details depends on the application server but it all comes down to how you create your InitialContext. For example, in WebLogic you would do this to lookup an EJB in another WebLogic Server:


The property values that you set in the Hashtable that is passed to InitialContext are specific to each application server but they all follow this basic model.
[ March 29, 2006: Message edited by: Chris Mathews ]
Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Both applications are deployed on the same server (Sun App)
Do I still need to connect like that? Seems like over kill

Thanks
Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Forget this post - just me being DUMB!!!
And stuffing up my naming
 
jQuery in Action, 2nd edition
 
subject: JNDI - Bind two applications
 
Similar Threads
jndi context
regarding JNDI
calling an ejb from web(servlets/jsp/webservices)
How to call SLSB using remote interfaces in different EAR
Question about JNDI