Java Reference
In-Depth Information
Maven will create the EJB-JAR module in the /target directory. This will create an EJB-
JAR module with no META-INF/ejb-jar.xml. To include the deployment descriptor, you
can create /src/main/resources/META-INF/ejb-jar.xml. By putting the deployment
descriptor in the standard Maven resources directory, Maven will automatically include it
when the EJB-JAR module is built.
These are two options for building an EJB-JAR module. Now we'll look at packaging ses-
sion and message-driven beans inside a WAR module.
13.3.2. Packaging EJB in WAR
The Java EE 6 specification allows for session and message-driven beans to be included
inside a WAR module instead of having to deploy them separately in an EJB-JAR module.
When included in a WAR module, the beans run in the EJB Lite container. This means that
not all functionality of a full EJB container is available, but simple applications or proto-
types will find this sufficient.
A WAR module is a Java JAR archive with contents conforming to the requirements of a
WAR module specified by the Java EE specification. Typically, a WAR module will con-
tain classes and other resources in a /classes subdirectory, third-party dependencies in a
Search WWH ::

Custom Search