-
1. Re: Jboss 7.1 EJB 2.1 Remote JNDI
thinksteep Mar 26, 2012 9:50 AM (in response to halliballi)Hi,
Try to follow the steps specified in below link. It should work.
https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI
-
2. Re: Jboss 7.1 EJB 2.1 Remote JNDI
ayagmur Mar 26, 2012 10:25 AM (in response to thinksteep)you may use these namings :
XXXRemote remote=(XXXRemote)context.lookup(
"xxx-ear/xxx-EJB//XXXBean!xxx.XXXRemote"
);
-
3. Re: Jboss 7.1 EJB 2.1 Remote JNDI
prasad.deshpande Mar 26, 2012 10:40 AM (in response to halliballi)I read that I have to use ejb: to remotely use my Beans. Does this mean that I have to change the naming in my XML of the Beans or do I have to switch to EJB 3 specs?
Or is there a way to map the names from java:something too ejb:something?
You don't necessarily have to use "ejb:" namespace. You can use combination of <appName>/<moduleName>/<beanName>!<fqn of interface> to get the remote remote interface implementation. You'll need to pass set of properties to InitialContext before that.
-
4. Re: Jboss 7.1 EJB 2.1 Remote JNDI
halliballi Mar 27, 2012 1:56 AM (in response to halliballi)I knew the example as described here
Try to follow the steps specified in below link. It should work.
https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI
and it is working for me. I can remotely lookup the Calculater and use it.
But when I deploy my 2.1 Beans I can not remotly get them.
I can skip the "ejb:"? is this true?
Can anyone tell me how I can get the correct name for my remote JNDI lookup for a Bean that is deployed like this?
Do I need "?stateful" or "?stateless" or can I skip the parameter too?
{code}
java:global/deminag/deminag_zdb-server/PartyFacadeEJB!com.bvg.mod.zdb.comps.party.common.PartyFacadeHome
java:app/deminag_zdb-server/PartyFacadeEJB!com.bvg.mod.zdb.comps.party.common.PartyFacadeHome
java:jboss/exported/deminag/deminag_zdb-server/PartyFacadeEJB!com.bvg.mod.zdb.comps.party.common.PartyFacadeHome
{code}
regards
-
5. Re: Jboss 7.1 EJB 2.1 Remote JNDI
jaikiran Mar 27, 2012 2:19 AM (in response to halliballi)What exact errors do you see and what does your client code and configuration look like?
-
6. Re: Jboss 7.1 EJB 2.1 Remote JNDI
halliballi Mar 27, 2012 9:16 AM (in response to jaikiran)I solved the problem. It was not an naming issue.
The problem was caused by my project configuration in NetBeans. The properties file was not read for my EJB 2.1 Beans but for the EJB 3 example.
I am very sorry. Thank you very much.
And for people who are interested, the name for remote JNDI that I use for my EJB 2.1 Beans is:
{code}
ejb:deminag/deminag_zdb-server//PartyFacadeEJB!com.bvg.mod.zdb.comps.party.common.PartyFacadeHome?stateless
{code}Regards