Is the SessionContext a specialized version of Context (or InitialContext)?
If I put an environmental variable called "myVariable" into the ejb-jar.xml, I can access this value by looking up java:comp/env/myVariable. If instead I choose not to include this variable in the ejb-jar file but instead bind it to the jndi tree, could this variable still be available using java:comp/env/myVariable?
posted 10 years ago
The SessionContext and javax.naming.Context classes are two completely different beasts. SessionContext has nothing to do with JNDI. ENC variables (i.e. java:comp/env/blah) will always be access via JNDI. The SessionContext is only capable of doing exactly what its interface defines.