tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arthur Portas <arthur.por...@itsector.pt>
Subject Re: ejb-ref for a ejb remote
Date Wed, 16 Sep 2015 16:46:32 GMT
Hi,

i use like this:
/* SERVICES */
@EJB(mappedName = "jndi:ext://itsector/RTimorServiceRemote")
RTimorServiceRemote rtimorServiceRemote;

to inject remore refs deployed on the same or another instance of TomEE.


2015-09-16 17:19 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com>:

> Hi
>
> with tomee the easiest is using jndi:ext I guess:
> http://tomee.apache.org/ejb-refs.html
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-09-16 9:10 GMT-07:00 mauro2java2011 <mauro2java2011@gmail.com>:
>
> > hi all.
> > from the ejb faq of glassfsih i read that for resolve the ejb-ref with a
> > remote ejb i have to put into glassfish-web.xml or sun-web.xml  the
> > following snippet of xml
> >
> >
> > Within sun-web.xml :
> >
> >   <ejb-ref>
> >     <ejb-ref-name>fooejbref</ejb-ref-name>
> >     <jndi-name>corbaname:iiop:host2:3700#Foo</jndi-name>
> >   </ejb-ref>
> >
> > next into a servlet for example i can resolve the dependencies on ejb
> > remote
> > like a ejb on the local server .
> >
> >   @EJB(name="fooejbref")
> >   private FooRemote fooRemote;
> >
> > ----------------------------------
> >
> > if you read is  setted the jndi-name with
> > <*jndi-name>corbaname:iiop:host2:3700#Foo</jndi-name>*
> >
> >
> > so  if I have multiple instances of the Appserver running and I want to
> > access a Remote EJB component between them i can resolve the dependencies
> > of remote ejb .
> >
> > NOw suppose that i would to make the same thing but with 2 tomee on
> > different host.
> >
> > like i can set the ejb-refernece ?
> >
> > i have to put into META-INF/resources.xml a xml with:
> >
> >  <ejb-ref>
> >     <ejb-ref-name>fooejbref</ejb-ref-name>
> >     <jndi-name>corbaname:hostnameremote/ejb/#Foo</jndi-name>
> > </ejb-ref>
> > ???????
> >
> > i would resolve the ejb dependence remote without jndilookup  but with :
> >
> > @EJB(name="fooejbref")
> >   private FooRemote fooRemote;
> >
> > and  EJB-REF where specify the location of tomee and ejb remote.
> >
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/ejb-ref-for-a-ejb-remote-tp4676255.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>

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