このコンテンツは選択した言語では利用できません。
7.8.4. jboss-ejb3.xml Deployment Descriptor Reference
jboss-ejb3.xml
is a custom deployment descriptor that can be used in either EJB JAR or WAR archives. In an EJB JAR archive it must be located in the META-INF/
directory. In a WAR archive it must be located in the WEB-INF/
directory.
The format is similar to
ejb-jar.xml
, using some of the same namespaces and providing some other additional namespaces. The contents of jboss-ejb3.xml
are merged with the contents of ejb-jar.xml
, with the jboss-ejb3.xml
items taking precedence.
This document only covers the additional non-standard namespaces used by
jboss-ejb3.xml
. Refer to http://java.sun.com/xml/ns/javaee/ for documentation on the standard namespaces.
The root namespace is
http://www.jboss.com/xml/ns/javaee
.
Assembly descriptor namespaces
The following namespaces can all be used in the
<assembly-descriptor>
element. They can be used to apply their configuration to a single bean, or to all beans in the deployment by using \*
as the ejb-name
.
- The clustering namespace:
urn:clustering:1.0
xmlns:c="urn:clustering:1.0"
xmlns:c="urn:clustering:1.0"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This allows you to mark EJB's as clustered. It is the deployment descriptor equivalent to@org.jboss.ejb3.annotation.Clustered
.<c:clustering> <ejb-name>DDBasedClusteredSFSB</ejb-name> <c:clustered>true</c:clustered> </c:clustering>
<c:clustering> <ejb-name>DDBasedClusteredSFSB</ejb-name> <c:clustered>true</c:clustered> </c:clustering>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The security namespace (
urn:security
) xmlns:s="urn:security"
xmlns:s="urn:security"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This allows you to set the security domain and the run-as principal for an EJB.<s:security> <ejb-name>*</ejb-name> <s:security-domain>myDomain</s:security-domain> <s:run-as-principal>myPrincipal</s:run-as-principal> </s:security>
<s:security> <ejb-name>*</ejb-name> <s:security-domain>myDomain</s:security-domain> <s:run-as-principal>myPrincipal</s:run-as-principal> </s:security>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The resource adapter namespace:
urn:resource-adapter-binding
xmlns:r="urn:resource-adapter-binding"
xmlns:r="urn:resource-adapter-binding"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This allows you to set the resource adapter for a Message-Driven Bean.<r:resource-adapter-binding> <ejb-name>*</ejb-name> <r:resource-adapter-name>myResourceAdapter</r:resource-adapter-name> </r:resource-adapter-binding>
<r:resource-adapter-binding> <ejb-name>*</ejb-name> <r:resource-adapter-name>myResourceAdapter</r:resource-adapter-name> </r:resource-adapter-binding>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The IIOP namespace:
urn:iiop
xmlns:u="urn:iiop"
xmlns:u="urn:iiop"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The IIOP namespace is where IIOP settings are configured.- The pool namespace:
urn:ejb-pool:1.0
xmlns:p="urn:ejb-pool:1.0"
xmlns:p="urn:ejb-pool:1.0"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This allows you to select the pool that is used by the included stateless session beans or Message-Driven Beans. Pools are defined in the server configuration.<p:pool> <ejb-name>*</ejb-name> <p:bean-instance-pool-ref>my-pool</p:bean-instance-pool-ref> </p:pool>
<p:pool> <ejb-name>*</ejb-name> <p:bean-instance-pool-ref>my-pool</p:bean-instance-pool-ref> </p:pool>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The cache namespace:
urn:ejb-cache:1.0
xmlns:c="urn:ejb-cache:1.0"
xmlns:c="urn:ejb-cache:1.0"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This allows you to select the cache that is used by the included stateful session beans. Caches are defined in the server configuration.<c:cache> <ejb-name>*</ejb-name> <c:cache-ref>my-cache</c:cache-ref> </c:cache>
<c:cache> <ejb-name>*</ejb-name> <c:cache-ref>my-cache</c:cache-ref> </c:cache>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Example 7.5. Example jboss-ejb3.xml file