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 java:comp/env - required? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "java:comp/env - required?" Watch "java:comp/env - required?" New topic
Author

java:comp/env - required?

Neil Rapley
Greenhorn

Joined: Jun 22, 2001
Posts: 1
Is the prefix java:comp/env required when assigning a JNDI name to an EJB? I have named mine without any prefix and it seems to work fine. Are there any consequences of not using it?
Thanks,
Neil.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Using java:comp/env/ejb makes it portable, as well as declaring that the object is question "is" an EJB. On the other hand, I have several legacy beans that are setup the way you mentioned. All that's really necessary is that however you refer to it, that the process of resolving the JNDI name returns the home of the item in question.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java:comp/env - required?
 
Similar Threads
Calling a BMP Entity Bean 2.0 From the Web Module
whats the use of ejb reference
URGENT Please!!! JNDI Naming :)
JNDI Connection using struts
WSAD JMS Configuration