aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Specifying jndi properties for using @EJB from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Specifying jndi properties for using @EJB from a servlet" Watch "Specifying jndi properties for using @EJB from a servlet" New topic
Author

Specifying jndi properties for using @EJB from a servlet

Sandhya Narayanan
Greenhorn

Joined: Apr 22, 2007
Posts: 7
I have a servlet deployed in a JBoss server and it has to look up an EJB deployed in a remote WebLogic server using the @EJB annotation. Where do I pass the jndi properties such as JNDI server url and port? I put the jndi.properties file in the classpath, but it is not working.
Thanks in advance.

-Sandhya
[ April 24, 2007: Message edited by: Sandhya Narayanan ]
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Creata a hashmap with the connection properties and pass it as parameter to the InitialContext.Refer the vedor documentation for more information.


Rahul Bhattacharjee
LinkedIn - Blog
Sandhya Narayanan
Greenhorn

Joined: Apr 22, 2007
Posts: 7
I'm not using JNDI API, so there is no InitialContext. How do I specify the JNDI information when @EJB annotation is used.
Thanks

-Sandhya
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Specifying jndi properties for using @EJB from a servlet