Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI Call  RSS feed

 
Jamal Hasanov
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, All
My EJBS run on server A. How should I call this EJBs from server B using servlets?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only differences to calling EJBs running on the same server are:
1) You can't use local interfaces (obviously)
2) You have to set a couple of configuration properties when creating the InitialContext
Here's an example for WebLogic:
 
Sergiu Truta
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly as you would from any EJB client. Inside the servlet's code initialize the context for server A and then lookup for the beans.
 
Jamal Hasanov
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx a lot, guys
It works. I got a few tips from JBoss's forum, as well. I did it that way:

Additionally you had to copy some .jar files to your servlet /lib directory.
With Best Regards,
Jamal Hasanov
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!