PDF 文書ファイルをダウンロードする (1146 KB)
EejbDefines runtime properties for a single enterprise bean within the application. The subelements listed below apply to particular enterprise beans as follows:
Superelementsenterprise-beans (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the ejb element. Table A–40 ejb Subelements
AttributesThe following table describes attributes for the ejb element. Table A–41 ejb Attributes
Example<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>
ejb-nameIn the sun-ejb-jar.xml file, matches the ejb-name in the corresponding ejb-jar.xml file. The name must be unique among the names of the enterprise beans in the same EJB JAR file. There is no architected relationship between the ejb-name in the deployment descriptor and the JNDI name that the deployer assigns to the EJB component’s home. In the sun-cmp-mappings.xml file, specifies the ejb-name of the entity bean in the ejb-jar.xml file to which the container-managed persistence (CMP) bean corresponds. Superelementsejb, method (sun-ejb-jar.xml); entity-mapping (sun-cmp-mappings.xml) Subelementsnone - contains data ejb-refMaps the ejb-ref-name in the corresponding Java EE deployment descriptor file ejb-ref entry to the absolute jndi-name of a resource. The ejb-ref element is used for the declaration of a reference to an EJB’s home. Applies to session beans or entity beans. Superelementssun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml), sun-application-client (sun-application-client.xml) SubelementsThe following table describes subelements for the ejb-ref element. Table A–42 ejb-ref Subelements
ejb-ref-nameSpecifies the ejb-ref-name in the corresponding Java EE deployment descriptor file ejb-ref entry. Superelementsejb-ref (sun-web.xml, sun-ejb-jar.xml, sun-application-client.xml) Subelementsnone - contains data eligibleSpecifies whether the application client module is eligible to be Java Web Start enabled. Allowed values are true (the default) and false. Superelementsjava-web-start-access (sun-application-client.xml) Subelementsnone - contains data endpoint-address-uriSpecifies the relative path combined with the web server root to form the fully qualified endpoint address for a web service endpoint. This is a required element for EJB endpoints and an optional element for servlet endpoints. For servlet endpoints, this value is relative to the web application context root. For EJB endpoints, the URI is relative to root of the web server (the first portion of the URI is a context root). The context root portion must not conflict with the context root of any web application deployed to the same web server. In all cases, this value must be a fixed pattern (no ”*’ allowed). If the web service endpoint is a servlet that implements only a single endpoint and has only one url-pattern, it is not necessary to set this value, because the web container derives it from the web.xml file. Superelementswebservice-endpoint (sun-web.xml, sun-ejb-jar.xml) Subelementsnone - contains data ExampleIf the web server is listening at http://localhost:8080, the following endpoint-address-uri: <endpoint-address-uri>StockQuoteService/StockQuotePort</endpoint-address-uri> results in the following target endpoint address: http://localhost:8080/StockQuoteService/StockQuotePort enterprise-beansSpecifies all the runtime properties for an EJB JAR file in the application. Superelementssun-ejb-jar (sun-ejb-jar.xml) SubelementsThe following table describes subelements for the enterprise-beans element. Table A–43 enterprise-beans Subelements
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> entity-mappingSpecifies the mapping a bean to database columns. Superelementssun-cmp-mapping (sun-cmp-mappings.xml) SubelementsThe following table describes subelements for the entity-mapping element. Table A–44 entity-mapping Subelements
establish-trust-in-clientSpecifies if the target is capable of authenticating a client. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data establish-trust-in-targetSpecifies if the target is capable of authenticating to a client. The values are NONE, SUPPORTED, or REQUIRED. Superelementstransport-config (sun-ejb-jar.xml) Subelementsnone - contains data |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||