tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Can I lookup a different service from a service without @EJB?
Date Fri, 03 Jun 2011 18:15:17 GMT
it works but your properties are false. You should provide the qualified
name of the factory.

2011/6/3 Andre Brito <andrebritofonseca@gmail.com>

> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message