Ok,

the ejb-local-ref in a session bean is local to the sessoin bean. This means:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"; version="3.1">
  <enterprise-beans>
    <session>
      <ejb-name>dataRepo</ejb-name>
    </session>
    <session>
      <ejb-name>MainEJB</ejb-name>
      <ejb-local-ref>
        <ejb-ref-name>ejb/TheRepo</ejb-ref-name>
        <local>optimus.DataRepo</local>
      </ejb-local-ref>
    </session>
  </enterprise-beans>
</ejb-jar>

works (that said since you have a custom "run" bean (MainEJB) you can
also get it injected in this bean without any xml config.

This is different from webapp descriptors (web.xm) where the
ejb-local-ref is global to the webapp (to be more generic the
reference is in the scope of the parent tag ie the webapp or the
session bean in which it is defined).





Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2014-11-18 0:05 GMT+01:00 [email protected]
<[email protected]>:
> Here it is:
>
> https://github.com/bolerio/embeddedejb
>
> Thank you!
> Boris
>
>
>
> --
> View this message in context: 
> http://tomee-openejb.979440.n4.nabble.com/using-local-ejb-reference-in-the-embedded-container-tp4672896p4672908.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to