Hi,

I'm using a Tomcat 3.3 and try to access a session-EJB from a servlet.
When I try to get an InitialContext in my servlet:

      Hashtable env = new Hashtable();
      Context ic =  new InitialContext(env);
      EJBMMHome home = (EJBMMHome) ic.lookup("EJBMM");

I get the error:

class javax.naming.NoInitialContextException:
Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file:
java.naming.factory.initial.

I think, the Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL, have
to put to the env-Hashtable.

env.put(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory);
env.put(Context.PROVIDER_URL, providerURL);

??? but what are the values for initCtxFactory and providerURL ???

Can anybody help me?

Gru�
Michael

--
Java - write once, run anywhere



Reply via email to