You need a ejb-local-ref in the slsb section of your ejb-jar.xml
than you can lookup the local home interface in slsb implementation:
Context initial = new InitialContext();
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
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>");
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