Hey guys. The subject of this thread is ugly, I know. Pardon me, my english
is very poor.
I know I can use @EJB. Is simpler, easier and cleaner. But this question
appeared in the team. With JBoss, if I'm in SessionBean A and I need
SessionBean B, I must call the ServiceLocator. How can I do that with
OpenEJB? I tied this:
> // SessionBean A looking up SessionBean B
> Properties properties = new Properties();
> properties.setProperty(Context.INITIAL..., "RemoteInitialContextFactory");
> properties.setProperty(Context.PROVIDER_URL, "ejbd://10.1.1.2:4201");
>
> // 10.1.1.2 is where the server is started, using openejb start
> --ejbd-bind.
>
> Context ctx = new InitialContext(properties);
> ctx.lookup("SessionBeanBRemote");
>
Apparently, it can't locate SessionBeanB. What am I doing wrong?
Thanks in advance,
Regards,
Andre.
--
View this message in context:
http://openejb.979440.n4.nabble.com/Can-I-lookup-a-different-service-from-a-service-without-EJB-tp3571549p3571549.html
Sent from the OpenEJB User mailing list archive at Nabble.com.