I hope this may save some time for someone.
The below is taken from the clients documentation page:

Properties p = new Properties();
p.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
// The below is incorrect
// p.put("java.naming.provider.url", "http://127.0.0.1:8080/openejb/ejb";);
// It might seem obvious but nevertheless the correct url is
p.put("java.naming.provider.url", "http://127.0.0.1:8080/tomee/ejb";);
// user and pass optional
p.put("java.naming.security.principal", "myuser");
p.put("java.naming.security.credentials", "mypass");

InitialContext ctx = new InitialContext(p);

MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote");

--
View this message in context: 
http://openejb.979440.n4.nabble.com/Remote-Client-with-TomEE-tp4631978.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to