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 Using constants for jndi names 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 "Using constants for jndi names " Watch "Using constants for jndi names " New topic
Author

Using constants for jndi names

Nidhi Juneja
Greenhorn

Joined: Oct 07, 2002
Posts: 27
Hi all,
In my application I have few MDBs using Queues and Topics. I also have few stateless session beans. I want to use constants ( not thru an interface or a constant class ) for the jndi names for all of them instead of actually hardcoding these names while doing the lookups in the code. I am using weblogic 8.1. Is there any way constants can be set in ejb-jar.xml or weblogic-ejb-jar.xml to achieve this.

Will appreciate any inputs.
Thanks,
Nidhi
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
You can always set them as environment entries in the ejb-jar.xml using the env-entry element.
[ February 26, 2004: Message edited by: Chris Mathews ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using constants for jndi names
 
Similar Threads
Mastering EJB - not quite! newby Q
Urgent: Problem with JNDI and data source
How to configure JNDI for a stateless Bean ?
Deployment Descriptors
jndi name in ejb3?