tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sells <>
Subject JNDI EJB Lookup and OpenEJB Loader Application
Date Wed, 22 Jul 2009 16:46:02 GMT
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


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.PROVIDER_URL, "");
InitialContext initialContext = new InitialContext(properties);
CalculatorRemote calculator = (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.


 What is the correct context to set for the given scenario?



(sorry if this is appearing twice.  It didn't seem to appear the first
time... was part way through registration.)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message