Attempting to get a reference to the home of a bean.

Context is setup as follows:

      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY,
          "com.evermind.server.rmi.RMIInitialContextFactory");
      env.put(Context.SECURITY_PRINCIPAL, "admin");
      env.put(Context.SECURITY_CREDENTIALS, "admin");
      env.put(Context.PROVIDER_URL,          
"ormi://kecooper-lap:23792/Stateless1");
      Context ctx = new InitialContext(env);

Doing a lookup as per the following:

      Stateless1Home stateless1Home =         
(Stateless1Home)ctx.lookup("Stateless1");

All works well - no issues.
Problem is converting above lookup to a lookup of the following type:

     Object homeObject = ctx.lookup("java:comp/env/Stateless1");

The subsequent step would be to narrow the homeObject reference. However I 
cannot get the reference. Using Oracles JDeveloper9i I get the following 
error message:

     javax.naming.NameNotFoundException: java:comp/env/Stateless1 not found

Need some help in determining hyow to fix this problem. I have modified 
several xml files, in particular ejb-jar.xml and orion-ejb-jar.xml to no 
avail.

PLEASE let me know a possible solution as soon as possible.

THANKS - Ken Cooper

------------------------------------------------------
Kenneth Cooper, Jr.            [EMAIL PROTECTED]
------------------------------------------------------


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


Reply via email to