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 Can you add values to the SessionContext without using ejb-jar? 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 "Can you add values to the SessionContext without using ejb-jar?" Watch "Can you add values to the SessionContext without using ejb-jar?" New topic
Author

Can you add values to the SessionContext without using ejb-jar?

J. Adam White
Greenhorn

Joined: Jan 31, 2005
Posts: 16
Is it possible to add values to the SessionContext at runtime? I have a third party bean that expects a absolute file path to a configuration file. Trouble is, this file is in a different location for each environment (DEV/QA/PROD) and we package our application as an ear file. I would like to determine the location of the file when the application starts up and bind this value to the jndi tree. Can it be done? The 3rd party bean is looking for the value to be located at java:comp/env/configFileLocation.

Regards,

Joshua
Marco Barenkamp
Ranch Hand

Joined: Aug 27, 2001
Posts: 94
Hi,

no, that is not possible. Modifying the environment entries leads into redeploy.


Marco Barenkamp<br />_ _ _ _ _ ________________________ _ _ _ _ _ <br />L M I N T E R N E T S E R V I C E S AG<br /> <br />Head of Software Development<br /> <br /> <br />BEA Certified Enterprise Developer<br />Sun Certified Programmer for the Java2 Platform<br />Sun Certified Web Component Developer for the Java2 Platform<br />Sun Certified Developer for the Java 2 Platform <br />Sun Certified Business Component Developer for the Java 2 Platform <br />Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition<br /> <br />LMIS AG
 
Don't get me started about those stupid light bulbs.
 
subject: Can you add values to the SessionContext without using ejb-jar?