• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

context lookup() from a servlet

 
c hart
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have an application that works properly, in that it sucessfully looks up an EJB using the JNDI name. However when I attempt to run the same code in a servlet the lookup() fails and says "myBean not defined in this context" I am using Tomcat. Is there any security or other configurations that are needed for my servlet to be able to see my JNDI names?
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Welcome to Javaranch. We follow certain conventions with respect to the User name as given in the document here .
Your user name does not follow these conventions. Please re-register with a name following these conventions.
Thanks.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat is not an EJB server. For that, you have to pair it with something like the JOnAS EJB system (http://www.objectweb.org). JOnAS provides a JNDI registry service and EJB server.
 
c hart
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB is running in the borland appserver. The issue is from an application I can do the lookup no problem, but when I take the code that does the lookup and make it a servlet and run it in the webserver with the ejb still on the appserver then the lookup fails.
Originally posted by Tim Holloway:
Tomcat is not an EJB server. For that, you have to pair it with something like the JOnAS EJB system (http://www.objectweb.org). JOnAS provides a JNDI registry service and EJB server.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic