weblogic-ejb-jar
weblogic-ejb-jar.xml
weblogic-ejb-jar is the root element of the weblogic component of the EJB deployment descriptor.
weblogic-enterprise-bean
weblogic-ejb-jar
weblogic-ejb-jar.xml
Contains deployment information for a bean.
entity
jboss.xml
session
jboss.xml
message-driven
jboss.xml
ejb-name
Name of an EJB defined in ejb-jar.xml
Required element in method stanza. The name must conform to the lexical rules for an NMTOKEN.
method
weblogic-ejb-jar.xml
ejb-name specifies the name of an EJB to which WebLogic Server applies isolation level properties. This name is assigned by the ejb-jar file's deployment descriptor. The name must be unique among the names of the enterprise beans in the same ejb.jar file. The enterprise bean code does not depend on the name; therefore the name can be changed during the application-assembly process without breaking the enterprise bean's function. There is no built-in relationship between the ejb-name in the deployment descriptor and the JNDI name that the deployer will assign to the enterprise bean's home.
method
ejb-name
jboss.xml
configuration-name
jboss.xml
mdb-client-id
jboss.xml
entity-descriptor
XML stanza
One entity-descriptor stanza is required for each entity EJB in the .jar.
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The entity-descriptor element specifies the following deployment parameters that are applicable to an entity bean: - pool - entity-cache - persistence - entity-clustering
The following example shows the structure of the entity-descriptor stanza: <entity-descriptor> <entity-cache>...</entity-cache> <persistence>...</persistence> <entity-clustering>...</entity-clustering> </entity-descriptor>
entity
jboss.xml
entity-cache
XML stanza
Optional element. Valid only for entity beans.
entity-descriptor
weblogic-ejb-jar.xml
The entity-cache element defines the following options used to cache entity EJB instances within WebLogic Server: - max-beans-in-cache - idle-timeout-seconds - read-timeout-seconds - concurrency-strategy
The entity-cache stanza is shown here: <entity-descriptor> <entity-cache> <max-beans-in-cache>...</max-beans-in-cache> <idle-timeout-seconds>...</idle-timeout-seconds> <read-timeout-seconds>...<read-timeout-seconds> <concurrency-strategy>...</concurrency-strategy> </entity-cache> <persistence>...</persistence> <entity-clustering>...</entity-clustering> </entity-descriptor>
read-only
jboss.xml
commit-option
jboss.xml
read-timeout-seconds
0
maxSeconds
600
Optional element. Valid only for entity EJBs.
entity-cache
weblogic-ejb-jar.xml
The read-timeout-seconds element specifies the number of seconds between ejbLoad() calls on a Read-Only entity bean. By default, read-timeout-seconds is set to 600, and WebLogic Server calls ejbLoad() only when the bean is brought into the cache.
The following entry causes WebLogic Server to call ejbLoad() for instances of the AccountBean class only when the instance is first brought into the cache: <weblogic-enterprise-bean> <ejb-name>AccountBean</ejb-name> <entity-descriptor> <entity-cache> <read-timeout-seconds>0</read-timeout-seconds> </entity-cache> </entity-descriptor> </weblogic-enterprise-bean>
commit-option
jboss.xml
optiond-refresh-rate
jboss.xml
concurrency-strategy
Exclusive
Database
ReadOnly
Optimistic
Database
Optional element. Valid only for entity EJBs.
entity-cache
weblogic-ejb-jar.xml
The concurrency-strategy element specifies how the container should manage concurrent access to an entity bean. Set this element to one of four values: - Exclusive causes WebLogic Server to place an exclusive lock on cached entity EJB instances when the bean is associated with a transaction. Other requests for the EJB instance are block until the transaction completes. This option was the default locking behavior for WebLogic Server versions 3.1 through 5.1. - Database causes WebLogic Server to defer locking requests for an entity EJB to the underlying datastore. With the Database concurrency strategy, WebLogic Server allocates a separate entity bean instance and allows locking and caching to be handled by the database. This is the default option. - ReadOnly used for read-only entity beans. Activates a new instance for each transaction so that requests proceed in parallel. WebLogic Server calls ejbLoad() for ReadOnly beans are based on the read-timeout-seconds parameter. - Optimistic holds no locks in the EJB container or database during a transaction. The EJB container verifies that none of the data updated by a transaction has changed before committing the transaction. If any updated data changed, the EJB container rolls back the transaction.
The following entry identifies the AccountBean class as a read-only entity EJB: <weblogic-enterprise-bean> <ejb-name>AccountBean</ejb-name> <entity-descriptor> <entity-cache> <concurrency-strategy>ReadOnly</concurrency-strategy> </entity-cache> </entity-descriptor> </weblogic-enterprise-bean>
commit-option
jboss.xml
reference-descriptor
XML stanza
n/a
Optional element.
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The reference-descriptor element maps references in the ejb-jar.xml file to the JNDI names of actual resource factories and EJBs available in WebLogic Server.
The reference-descriptor stanza contains one or more additional stanzas to define resource factory references and EJB references. The following shows the organization of these elements: <reference-descriptor> <resource-description> ... </resource-description> <ejb-reference-description> ... </ejb-reference-description> </reference-descriptor>
ejb-ref
jboss.xml
ejb-local-ref
jboss.xml
resource-ref
jboss.xml
resource-env-ref
jboss.xml
resource-description
XML stanza
n/a
Optional element.
reference-descriptor
weblogic-ejb-jar.xml
The resource-description element maps a resource reference defined in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.
The resource-description stanza can contain additional elements as shown here: <reference-descriptor> <resource-description> <res-ref-name>. . .</res-ref-name> <jndi-name>...</jndi-name> </resource-description> <ejb-reference-description> <ejb-ref-name>. . .</ejb-ref-name> <jndi-name>. . .</jndi-name> </ejb-reference-description> </reference-descriptor>
resource-ref
jboss.xml
res-ref-name
A valid resource reference name from the ejb-jar.xml file
n/a
Required element if the EJB specifies resource references in ejb-jar.xml
resource-description
weblogic-ejb-jar.xml
The res-ref-name element specifies the name of a resource factory reference. This is the reference that the EJB provider places within the ejb-jar.xml deployment file.
resource-description
res-ref-name
jboss.xml
jndi-name
Valid JNDI name
n/a
Required in resource-description and ejb-reference-description.
resource-description
ejb-reference-description
weblogic-ejb-jar.xml
jndi-name specifies the JNDI name of an actual EJB, resource, or reference available in WebLogic Server.
resource-description
ejb-reference-description
jndi-name
jboss.xml
resource-env-description
XML stanza
n/a
Optional element.
reference-descriptor
weblogic-ejb-jar.xml
The resource-env-description element maps a resource environment reference defined in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.
The resource-env-description stanza can contain additional elements as shown here: <reference-descriptor> <resource-env-description> <res-env-ref-name>. . .</res-env-ref-name> <jndi-name>...</jndi-name> </reference-env-description> </reference-descriptor>
resource-env-ref
jboss.xml
res-env-ref-name
A valid resource environment reference name from the ejb-jar.xml file
n/a
A valid resource environment reference name from the ejb-jar.xml file
resource-env-description
weblogic-ejb-jar.xml
The res-env-ref-name element specifies the name of a resource environment reference.
resource-description
resource-env-ref-name
jboss.xml
ejb-reference-description
XML stanza
Optional element
reference-descriptor
weblogic-ejb-jar.xml
The ejb-reference-description element maps the JNDI name in the WebLogic Server of an EJB that is referenced by the bean in the ejb-reference element.
The ejb-reference-description stanza is shown here: <ejb-reference-description> <ejb-ref-name>AdminBean</ejb-ref-name> <jndi-name>payroll.AdminBean</jndi-name> </ejb-reference-description>
ejb-ref
jboss.xml
ejb-ref-name
Optional element
ejb-reference-description
weblogic-ejb-jar.xml
The ejb-ref-name element specifies a resource reference name. This element is the reference that the EJB provider places within the ejb-jar.xml deployment file.
The ejb-ref-name stanza is shown here: <ejb-reference-description> <ejb-ref-name>AdminBean</ejb-ref-name> <jndi-name>payroll.AdminBean</jndi-name> </ejb-reference-description>
ejb-ref-name
jboss.xml
ejb-local-reference-description
Optional element
reference-descriptor
weblogic-ejb-jar.xml
The ejb-local-reference-description element maps the JNDI name of an EJB in theWebLogic Server that is referenced by the bean in the ejb-local-ref element.
The following example shows the ejb-local-reference-description element. <ejb-local-reference-description> <ejb-ref-name>AdminBean</ejb-ref-name> <jndi-name>payroll.AdminBean</jndi-name> </ejb-local-reference-description>
ejb-local-ref
jboss.xml
local-jndi-name
Valid JNDI name
n/a
Required if the bean has a local home.
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The local-jndi-name element specifies a jndi-name for a bean's local home. If a bean has both a remote and a local home, then it must have two JNDI names; one for each home.
The following example specifies the local-jndi-name element. <local-jndi-name>weblogic.jndi.WLInitialContext </local-jndi-name>
local-jndi-name
jboss.xml
stateless-session-descriptor
XML stanza
n/a
One stateless-session-descriptor element is required for each stateless session EJB in the JAR file.
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The stateless-session-descriptor element defines deployment parameters, such as caching, clustering, and persistence for stateless session EJBs in WebLogic Server.
The following example shows the structure of the stateless-session-descriptor stanza: <stateless-session-descriptor> <pool>...</pool> <stateless-clustering>...</stateless-clustering> </stateless-session-descriptor>
session
jboss.xml
stateful-session-descriptor
XML stanza
n/a
One stateful-session-descriptor stanza is required for each stateful session EJB in the .jar.
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The stateful-session-descriptor element specifies the following deployment parameters that are applicable for stateful session EJBs in WebLogic Server: - stateful-session-cache - persistent-store-dir - stateful-session-clustering - allow-concurrent-calls
The following example shows the structure of the stateful-session-descriptor stanza: <stateful-session-descriptor> <stateful-session-cache>...</stateful-session-cache> <persistence>...</persistence> <allow-concurrent-calls>...</allow-concurrent-calls> <persistent-store-dir>/weblogic/myserver</persistent-store-dir> <stateful-session-clustering>...</stateful-session-clustering> </stateful-session-descriptor>
session
jboss.xml
container-configuration
jboss.xml
message-driven-descriptor
XML stanza
n/a
weblogic-enterprise-bean
weblogic-ejb-jar.xml
The message-driven-descriptor element associates a message-driven bean with a JMS destination in WebLogic Server. This element specifies the following deployment parameters: - pool - destination-jndi-name - initial-context-factory - provider-url - connection-factory-jndi-name
The following example shows the structure of the message-driven-descriptor stanza: <message-driven-descriptor> <destination-jndi-name>...</destination-jndi-name> </message-driven-descriptor>
message-driven
jboss.xml