3.2. Referencing EJB3 Session Beans from non-EJB3 Beans
JBoss Enterprise Application Platform 5 will fully support the entire Java 5 Enterprise Edition specification. In the meantime JBoss Enterprise Application Platform 4.3 implements EJB3 functionality by way of an EJB MBean container running as a plugin in the JBoss Application Server. This has certain implications for application development.
The EJB3 plugin injects references to an EntityManager and @EJB references from one EJB object to another. However this support is limited to the EJB3 MBean and the JAR files it manages. Any JAR files which are loaded from a WAR (such as Servlets, JSF backing beans, and so forth) do not undergo this processing. The Java 5 Enterprise Edition standard specifies that a Servlet can reference a Session Bean through an @EJB annotated reference, however this is not implemented in JBoss Enterprise Application Platform 4.3.
In order to access an EJB3 Session Bean from a Servlet or JSF Backing Bean you will need to do one of two things: