Java Reference
In-Depth Information
Listing 13.5. A simple ejb-jar.xml
If you're using deployment descriptors for your EJBs, make sure that you set the ejb-
jar version to 3.2 because this will be used by the Java EE server to determine the
version of the EJBs being packaged in an archive. The name element identifies an EJB
and is the same as the name element in the @Stateless annotation. These must match if
you're overriding any values specified in the annotation with a descriptor. The session-
type element determines the type of session bean. This value can be either stateless
or stateful. You can use transaction-type to specify whether the bean uses CMT
( Container ) or BMT ( Bean ). The transaction, security, and other assembly details are
set using the assembly-descriptor tag of the deployment descriptor
Table 13.2 lists commonly used annotations and their corresponding descriptor tags. Note
that as we mentioned earlier there's an element for every annotation. You'll need only those
that make sense for your development environment. Some of the descriptor elements you'll
Search WWH ::

Custom Search