Java Reference
In-Depth Information
be specified here. Definitions for the six different transactional attributes are in the EJB speci-
fication.
You can see the contents of the entire ejb-jar.xml file in Listing 12.4
L ISTING 12.4
ejb-jar.xml
<?xml version=”1.0”?>
<!DOCTYPE ejb-jar PUBLIC “-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN” “http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd”>
12
<ejb-jar>
<enterprise-beans>
<session>
<description>
Makes calculations related to a loan
</description>
<ejb-name>CalculateLoan</ejb-name>
<home>CalculateLoanHome</home>
<remote>CalculateLoan</remote>
<ejb-class>CalculateLoanBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<description>
The yearly interest rate.
</description>
<env-entry-name>interestRate</env-entry-name>
<env-entry-type>java.lang.Float</env-entry-type>
<env-entry-value>8.2</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>CalculateLoan</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
 
Search WWH ::




Custom Search