Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI - Bind two applications

 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget this post - just me being DUMB!!!
And stuffing up my naming
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic