load a jndi.properties file from a EJB
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   johannes_rainer
Posted On:   Tuesday, March 4, 2003 07:29 AM

load a jndi.properties file from a EJB


how ca i load a jndi.properties file which is within the same jar file as the EJBs? i have tried to load it via this.getClass().getClassLoader.getRessourceAsStream("jndi.properties"), but this hasn't worked.

Re: load a jndi.properties file from a EJB

Posted By:   Thomas_Risberg  
Posted On:   Monday, March 10, 2003 08:49 PM

Try to alter the path for the lookup using a / in front of the file name -- like getResourceAsStream("/jndi.properties"). This will look at the root of you class path rather than from the path where the class that is doing the lookup is located. Whether this works or not depends of course on where you actually put the jndi.properties file.

Re: load a jndi.properties file from a EJB

Posted By:   Bozidar_Dangubic  
Posted On:   Tuesday, March 4, 2003 09:39 AM

why would you put jndi.properties in the ejb jar file?
About | Sitemap | Contact