wushutwist
Programmer
I am trying to get a JNDI Context for a EJB from within another EJB.
We used to do it like this:
Unfortunately SessionContext.getEnvironment() is deprecated and is no longer implemented in the new version of WebLogic (which we are using). The Sun docs give this cryptic message in regards to the deprecated method:
getEnvironment()
Deprecated. Use the JNDI naming context java:comp/env to access enterprise bean's environment.
Any clues as to what this means? Any sample code? Any comments other than to pass the properties to the bean? Thanks.
Wushutwist
We used to do it like this:
Code:
Properties props = ctx.getEnvironment();
try {
Context ctx = new InitialContext(props);
EJBHome home = (EJBHome) ctx.lookup("EJBBean");
}
getEnvironment()
Deprecated. Use the JNDI naming context java:comp/env to access enterprise bean's environment.
Any clues as to what this means? Any sample code? Any comments other than to pass the properties to the bean? Thanks.
Wushutwist