-
1. Re: what JNDI mapping is appliead to Local interfaces?
nic Sep 22, 2001 7:30 PM (in response to alu1344)Hi,
I have the same problem.
Is there something we have missed in the jboss
configuration to make local interfaces work ?
Anyone who has figured this out ?
Regards
/NiC -
2. Re: what JNDI mapping is appliead to Local interfaces?
alu1344 Sep 24, 2001 4:53 PM (in response to alu1344)Sorry, I finally did (and forgot to post it :)
Local interfaces are registered in local/BeanName. You have to remember the standard way to call them (no PortableRemoteObject.narrow call) and, my fault, that Collection of these ARE NOT SERIALIZABLE (that is, you cannot return these from a call to a remote EJB, and have to use Object Values or similar). If you implement exactly the same example as in the "Professional EJB" chapter that is available in theserverside.com, everything works. -
3. Re: what JNDI mapping is appliead to Local interfaces?
tadler Oct 9, 2001 4:13 PM (in response to alu1344)What version of JBoss supports local interfaces?
-
4. Re: what JNDI mapping is appliead to Local interfaces?
henrichen Dec 11, 2001 8:04 AM (in response to alu1344)> Sorry, I finally did (and forgot to post it :)
>
> Local interfaces are registered in local/BeanName.
Did you make it work on the 2.4.3? I have tried to look up it by given "local/BeanName" but only get an "local not bound" Exception?
Would you please give an working example?
Henri -
5. Re: what JNDI mapping is appliead to Local interfaces?
alexnet Dec 11, 2001 8:59 AM (in response to alu1344)In order to use local interfaces you have to add next section in deployment descriptor for your EJB:
<ejb-name>Bean0</ejb-name>
ejb.interfaces.BeanHome
ejb.interfaces.Bean
<local-home>ejb.interfaces.LocalBeanHome</local-home>
ejb.interfaces.LocalBean
<ejb-class>ejb.session.PSBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
You can refer to this EJB from other beans by adding ejb-local-ref to corresponding descriptor:
<ejb-local-ref>
<ejb-ref-name>local/Bean0</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>ejb.interfaces.LocalBeanHome</local-home>
ejb.interfaces.LocalBean
<ejb-link>Bean0</ejb-link>
</ejb-local-ref>
and, of course you have to implement javax.ejb.EJBLocalObject and javax.ejb.EJBLocalHome in yours remote and home interface respectively.
Alex.