Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>(...) all actual business logic lies in "manager" classes to which the session beans forward their calls.</p> </blockquote> <p>That was a very common pattern with EJB 2.x allowing to unit test the "manager" classes easily, outside the container, without any adherence to the EJB API.</p> <blockquote> <p>Can I somehow make these manager classes capable of being injected into the EJBs via @Resource and then having the other EJBs injected into them via @EJB?</p> </blockquote> <p>Not out-of-the-box with Java EE 5. Injection is limited only to first class constructs defined in the Java EE platform, including:</p> <ul> <li><code>SessionContext</code> object</li> <li><code>DataSources</code> object</li> <li><code>UserTransaction</code></li> <li><code>EntityManager</code> interface</li> <li><code>TimerService</code> interface</li> <li>Other enterprise beans</li> <li>Web services</li> <li>Message queues and topics</li> <li>Connection factories for resource adaptes</li> <li>Environment entries limited to String, Character, Byte, Short, Integer, Long, Boolean, Double, and Float.</li> </ul> <p>In Java EE 6, this would be possible using CDI (<a href="http://jcp.org/en/jsr/detail?id=299" rel="nofollow noreferrer">JSR-199</a>) and the <code>@Inject</code> annotation in EJBs to inject your managers and also in you managers to get EJBs injected. </p> <p><strong>Maybe</strong> you could try to deploy <a href="http://seamframework.org/Weld" rel="nofollow noreferrer">Weld</a> (the RI of JSR-199) as part of your application on GlassFish v2.1. I didn't experiment this myself, so I can't confirm anything. Just in case, maybe have a look at the <a href="http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html" rel="nofollow noreferrer">Chapter 18. Application servers and environments supported by Weld</a> (GlassFish v2.1 hasn't been tested, but it doesn't mean it doesn't work).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload