I am trying some basic tests with *Stateless* *EJB*'s using the Calculator example. I am running into difficulties with:
*JNDI* with respect to setting the *InitialContext* correctly for *remote*lookups. *Scenario*: I have deployed the Calculator example with a Remote interface into a * Tomcat* environment (with the OpenEjb Servlet installed). I have been able to lookup and invoke the calculator using a *standalone* program using the following code: Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory"); properties.setProperty(Context.PROVIDER_URL, " http://127.0.0.1:8080/openejb/ejb/"); InitialContext initialContext = new InitialContext(properties); CalculatorRemote calculator = (CalculatorRemote) initialContext.lookup("java:cal-1.0/CalculatorRemote"); result = cow.multiply(2, 333); Now I tried this same code inside a web application to see if it would work and it failed. This web application was running in the same instance of tomcat that the EJB is deployed in. *Question*: What is the correct context to set for the given scenario? Thanks, David (sorry if this is appearing twice. It didn't seem to appear the first time... was part way through registration.)
