Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide

enterprise-beans

Specifies all the runtime properties for an EJB JAR file in the application.

Superelements

sun-ejb-jar (sun-ejb-jar.xml)

Subelements

The following table describes subelements for the enterprise-beans element.

Table A–32 enterprise-beans Subelements

Element 

Required 

Description 

name

zero or one 

Specifies the name string. 

unique-id

zero or one 

Specifies a unique system identifier. This data is automatically generated and updated at deployment/redeployment. Do not specify or edit this value. 

ejb

zero or more 

Defines runtime properties for a single enterprise bean within the application. 

pm-descriptors

zero or one 

Deprecated. 

cmp-resource

zero or one 

Specifies the database to be used for storing container-managed persistence (CMP) beans in an EJB JAR file. 

message-destination

zero or more 

Specifies the name of a logical message destination. 

webservice-description

zero or more 

Specifies a name and optional publish location for a web service. 

Example

<enterprise-beans>
 <ejb>
	 <ejb-name>CustomerEJB</ejb-name>
	 <jndi-name>customer</jndi-name>
	 <resource-ref>
		 <res-ref-name>jdbc/SimpleBank</res-ref-name>
		 <jndi-name>jdbc/__default</jndi-name>
	 </resource-ref>
	 <is-read-only-bean>false</is-read-only-bean>
	 <commit-option>B</commit-option>
	 <bean-pool>
		 <steady-pool-size>10</steady-pool-size>
		<resize-quantity>10</resize-quantity>
		 <max-pool-size>100</max-pool-size>
		 <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
	 </bean-pool>
	 <bean-cache>
		 <max-cache-size>100</max-cache-size>
		 <resize-quantity>10</resize-quantity>
		 <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
		 <victim-selection-policy>LRU</victim-selection-policy>
	 </bean-cache>
 </ejb>
</enterprise-beans>