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 <[email protected]>: > 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. >
