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

JNDI/EJB question (newbi)  RSS feed

 
decob
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Just a quick question, I'm currently trying a simple example of calling an EJB with a custom tag..
<ejb:useEnterpriseBean
id="simpleHome"
location="java:comp/env/Simple"
type="SimpleHome"
remoteType="Simple"
remoteName="simple" />
My question is, where is java:comp/env located or does this value have to be set by me...?
Thanks
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this address is needed by the application server to locate the home interface of your ejb.
With this address you can later reference your bean with JNDI to work with it.
The java:comp/env is a reference for the application server so he knows to which this object belongs.
So there are some other locations e.g. java:jdbc/..
for your JDBC Driver
 
decob
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably should have said this, the problem i am haveing is: javax.servlet.ServletException: Error looking up home at java:comp/env/Simple
now is there some way i can get it to recognise the dir where the beans are as being the java:com/env?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!