I 'm developing an application that needs two JBoss. Now I'm using JBoss
4.0.1sp1. A Session A of one jboss must be access to another Session B of the
other jboss.
I was done:
<ejb-jar>
<enterprise-beans>
<ejb-name>Bean A</ejb-name>
AHome
A
<ejb-class>ABean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/myBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
BHome
B
</ejb-ref>
</enterprise-beans>
</ejb-jar>
jboss.xml:
<enterprise-beans>
<ejb-name>Bean A</ejb-name>
<ejb-ref>
<ejb-ref-name>ejb/myBean</ejb-ref-name>
<jndi-name>jnp://otherserver/application/beanB</jndi-name>
</ejb-ref>
<enterprise-beans>
I haven't maken changes in my java code, so since bean A I want to access to
bean b doing:
PortableRemoteObject.narrow(new InitialContext().lookup("ejb/myBean"),
BHome.class);
but the result at deploy is an Exception : javax.naming.NameNotFoundException
ejb/myBean not bound
If I put the string "jnp://otherserver/application/beanB" at lookup method it
works fine, but this is at java code! and it isn't good!
Is there any solution? How I can put in lookup de ejb-ref-name and the jboss
take de jndi-name to find it?
A lot of thanks!
mery
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930637#3930637
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930637
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user