Sun GlassFish Enterprise Server v3 Prelude Developer's Guide

Packaging an EJB JAR File in a Web Application

The Enterprise Server supports the EJB 3.1 specification, which allows EJB JAR files to be packaged in WAR files. EJB classes must reside under WEB-INF/classes. For example, the structure of a hello.war file might look like this:

index.jsp
META-INF/
   MANIFEST.MF
WEB-INF/
   web.xml
   classes/
      com/
         sun/
            v3/
               demo/
                  HelloEJB.class
                  HelloServlet.class

For more information about EJB components, see Chapter 8, Using Enterprise JavaBeans Technology.


Note –

For GlassFish v3 Prelude, EJB modules are not supported unless the optional EJB container add-on component is downloaded from the Update Tool. For information about the Update Tool, see the Sun GlassFish Enterprise Server v3 Prelude Installation Guide.

For GlassFish v3 Prelude, only stateless session beans with local interfaces and entity beans that use the Java Persistence API are supported. Stateful, message-driven, and EJB 2.0 and 2.1 entity beans are not supported. Remote interfaces and remote business interfaces for any of the bean types are not supported.