You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by zeddius <av...@gmail.com> on 2012/05/14 13:00:18 UTC
Remote Client with TomEE
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.
Re: Remote Client with TomEE
Posted by José Luis Cetina <ma...@gmail.com>.
This is because in beta version the name still in openejb, when the 1.0
version released then the name change to tomee
2012/5/14 zeddius <av...@gmail.com>
> 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.
>
--
-------------------------------------------------------------------
*SCJA. José Luis Cetina*
-------------------------------------------------------------------