I have two apps, injecting an ejb works like a charm when the dependent app
is already up deployed : 

<JndiProvider id="remoteContext" type="javax.naming.InitialContext">
        java.naming.provider.url = http://localhost:8081/tomee/ejb
        java.naming.factory.initial =
org.apache.openejb.client.RemoteInitialContextFactory
</JndiProvider>

@EJB(mappedName="jndi:ext://remoteContext/MyServiceRemote")
MyServiceRemote myServiceRemote;

In case of deployment order is not forced (in tomee.xml/server.xml), I would
like to lookup for the remote bean at demand but using a context defined by
JndiProvider (in tomee.xml) : 

MyServiceRemote myServiceRemote = (MyServiceRemote) new
InitialContext().lookup("jndi:ext://remoteContext/MyServiceRemote");

Is there anyway to lookup into "jndi:ext://*" ? 



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Lookup-not-inject-an-ejb-throught-a-context-defined-by-JndiProvider-tp4673947.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to