When initialContext() is called with no parameters (no environment specifically) when a bean references another bean, then where is the name of the INITIAL_CONTEXT_FACTORY picked up from? Is it set in an application resource file (jndi.properties in the java.home/lib directory?)

If it is set as a system property, would the bean developer explicitly set the System property from the environment property specified earlier, before calling initialContext()?  E.G:

public void changePhoneNumber(...) {
    String initCtxFactory = ejbContext.getEnvironment().getProperty(Context.INITIAL_CONTEXT_FACTORY);

    System.setProperty(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory);
    Context initCtx = new InitialContext();
    ...
}


Thanks!

Smita. =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to