Hi, as part of my learning, I tried to implement a dynamic page as follow:
JSP<->Java Bean<->EJB<->JDBC. I got it works as intended however with a
hack. Within the my Java Bean, in order to look up the EJB bean
successfully, I have to hard code the context info as follow:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
            "com.evermind.server.ApplicationClientInitialContextFactory");
    env.put(Context.PROVIDER_URL,"ormi://localhost/linkcontent");
    env.put(Context.SECURITY_PRINCIPAL,"xxxx");
    env.put(Context.SECURITY_CREDENTIALS,"xxxx");
    Context ctx = new InitialContext(env);
Which is not an ideal way. I'm having trouble from figuring out how to set
these information up so that I do not have to hard code this way. Any idea?

Thanks,
Tung

Reply via email to