-
1. Re: Local Interfaces: EJB2.0 - CMP Entity and SLSB
andreas Sep 4, 2001 11:36 AM (in response to hunterhillegas)You need a ejb-local-ref in the slsb section of your ejb-jar.xml
i.e.:
<ejb-local-ref>
<ejb-ref-name>SelectionEntity</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<ejb-link>SelectionEJB</ejb-link>
<local-home>eacm.ejb.SelectionHome</local-home>
eacm.ejb.Selection
</ejb-local-ref>
than you can lookup the local home interface in slsb implementation:
Context initial = new InitialContext();
(SelectionHome)initial.lookup "java:comp/env/SelectionEntity"); -
2. Re: Local Interfaces: EJB2.0 - CMP Entity and SLSB
fmarchioni Sep 5, 2001 3:52 AM (in response to hunterhillegas)Hi all,
I'd like to get involved in the topic as I have a doubt about local interfaces: How do I tell a SLSB to call an Entity Bean via Local interface ? it's completely automatic ? just mention that the Entity Bean has got a local interface and the SLSB -IF- living in the same container will direct to it transparentely ?
Thanks a lot
Francesco -
3. Re: Local Interfaces: EJB2.0 - CMP Entity and SLSB
andreas Sep 5, 2001 7:34 AM (in response to hunterhillegas)If You make a lookup with a name specified in a ejb-local-ref section You'll get a local interface.
(if you lookup with the ejb-name you get the remote interface)
In jBoss 3.0 it will be posible to define a ejb-local-name in the entity section of ejb-jar.xml. Then you can use lookup "java:/<local-nam>");
(whithout comp/env) -
4. Re: Local Interfaces: EJB2.0 - CMP Entity and SLSB
fmarchioni Sep 6, 2001 5:03 AM (in response to hunterhillegas)Hi. Thanks for replying. I have a last issue if you don't mind. What is the difference between "standard" EJB-EJB calls (from withing the same container) and EJB-Local Interface approach ? In both case the network is cut out, so the main benefit could be that with local interface you can achieve pass by reference semantics, while with standard EJB-EJB intra-container calls you have to use pass by value. Do you agree with me ?
Thanks & Regards
Francesco