tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject Re: remote ejb lookup from within tomee
Date Wed, 14 Jan 2015 14:01:47 GMT

It should work as well between webapps - we are able to do a copy
between classloaders.

That said you can try to add in conf/
openejb.localcopy=false to deactivate it.

Romain Manni-Bucau

2015-01-14 14:40 GMT+01:00 chriskriel <>:
> Using RemoteInitialContextFactory with URL=http://localhost:20/tomee/ejb from
> within a .war to lookup an EJB annotated with @Local and @Remote succeeds if
> the EJB is in the same .war. The outcome is the same whether I specify port
> 20, on which nothing listens on the localhost, or port 8080, on which tomcat
> is listening. In the catalina.out log I see:
> /Jan 14, 2015 2:05:21 PM org.apache.openejb.client.EventLogger log
> RemoteInitialContextCreated{providerUri=http://localhost:20/tomee/ejb}/
> but in the tomcat access log there is no request for /tomee/ejb. Using the
> same lookup from a different client JVM does show up in the access log as
> expected.
> This seems to indicate that the JNDI provider has done an optimization and
> did a local lookup because a remote lookup is not needed. This is not an
> issue.
> My issue is that I get the same behaviour when I try to lookup the reference
> from another .war in the same Tomee JVM. A local lookup is attempted and the
> reference is not available because the initial context is testing empty.
> Based on the fact that a remote lookup works from a different JVM it should
> also work in this scenario. It is probably needed here because of the
> different Class Loaders.
> Is there a different context per webapp in Tomee?
> Has anyone else had the same experience?
> If my observations are correct, what options do I have to control this
> behaviour?
> The option (as per the documentation) of using an @EJB reference with the
> link specified in the ejb-jar.xml also complains about the reference not
> being bound.
> --
> View this message in context:
> Sent from the TomEE Users mailing list archive at

View raw message