BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   Programming WebLogic Enterprise JavaBeans:   Previous topic   |   Next topic   |   Contents   

 

WebLogic Server 6.0 EJB Deployment Properties

 

The following sections provide a complete reference of the WebLogic specific XML deployment properties used in the WebLogic Server 6.0 EJB 2.0 container and an explanation of how to edit the XML deployment properties manually.

Manually Editing XML Deployment Files

To create and deploy message-driven beans, or use the new caching and clustering deployment elements, you must edit the following XML deployment files manually, using a text editor:

See also Basic Conventions for more information on the conventions to use when modifying XML deployment files.

DOCTYPE Header Information

When editing or creating XML deployment files, it is critical to include the correct DOCTYPE header for each deployment file. In particular, using an incorrect PUBLIC element within the DOCTYPE header can result in parser errors that may be difficult to diagnose. The correct text for the PUBLIC element for each XML deployment file is as follows.

XML File

PUBLIC Element String

ejb-jar.xml

 

`-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' `http://www.java.sun.com/dtd/ejb-jar_2_0.dtd'

 

weblogic-ejb-jar.xml

 

`-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN` `http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd`

 

weblogic-cmp-rdbms
-jar.xml

 

`-// BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN` `http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd`

 

For example, the entire DOCTYPE header for a weblogic-ejb-jar.xml file is as follows:

<!DOCTYPE weblogic-ejb-jar PUBLIC 
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>

XML files with incorrect header information may yield error messages similar to the following, when used with a utility that parses the XML (such as ejbc):

SAXException: This document may not have the identifier `identifier_name'

identifier_name generally includes the invalid text from the PUBLIC element.

Document Type Definitions (DTDs) for Validation

The contents and arrangement of elements in your XML files must conform to the Document Type Definition (DTD) for each file you use. WebLogic Server ignores the DTDs embedded within the DOCTYPE header of XML deployment files, and instead uses the DTD locations that were installed along with the server. However, the DOCTYPE header information must include a valid URL syntax in order to avoid parser errors.

The following links provide the new public DTD locations for XML deployment files used with the WebLogic Server EJB 2.0 container:

weblogic-ejb-jar.xml Deployment Descriptor File

weblogic-ejb-jar.xml defines EJB deployment descriptor DTDs which are unique to WebLogic Server. The EJB 2.0 container uses a version of weblogic-ejb-jar.xml that is different from the one shipped with WebLogic Server Version 5.1. The revised DTD for weblogic-ejb-jar.xml includes new elements for enabling stateful session EJB replication, configuring entity EJB locking behavior, and assigning JMS Queue and Topic names for message-driven beans. The new DTD also reorganizes the major stanzas into more logical sections.

You can continue to use the earlier weblogic-ejb-jar.xml DTD for EJB 1.1 that you will deploy into the EJB 1.1 container. However, if you want to use any of the new EJB 2.0 features or deploy beans into the EJB 2.0 container, you must use the DTD described in the sections listed in Index of weblogic-ejb-jar Deployment Elements.

The top level elements in the EJB weblogic-ejb-jar.xml are as follows:

Use the links above, or see Manually Editing XML Deployment Files for more information about individual EJB 2.0 deployment stanzas and elements. See also Manually Editing XML Deployment Files for complete information about the deployment elements introduced for EJB 1.1.

Index of weblogic-ejb-jar Deployment Elements

allow-concurrent-calls

Range of values:

 

true | false

 

Default value:

 

false

 

Requirements:

 

Requires the server to throw a RemoteException when a stateful session bean instance is currently handling a method call and another (concurrent) method call arrives on the server.

 

Parent elements:

 

weblogic-enterprise-bean

     stateful-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The allow-concurrent-calls element specifies whether a stateful session bean instance will allow concurrent method calls. By default, allows-concurrent-calls is false. However, when this value is set to true, the EJB container blocks the concurrent method call and allows it to proceed when the previous call has completed.

Example

See stateful-session-descriptor.

concurrency-strategy

Range of values:

 

Exclusive | Database | ReadOnly

 

Default value:

 

Database

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-cache

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

This element determines ejbLoad() and ejbStore() behavior for entity EJB instances. You can set this element to one of three possible values:

See Locking and Caching Services for Entity EJBs for more information on the Exclusive and Database locking behaviors. See Read-Write Cache Strategy for more information about read-only entity EJBs.

Example

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>

db-is-shared

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The db-is-shared element applies only to entity beans. When set to true WebLogic Server assumes that EJB data could be modified between transactions and reloads data at the beginning of each transaction. When set to false WebLogic Server assumes that it has exclusive access to the EJB data in the persistent store. See Using db-is-shared to Limit Calls to ejbLoad() for more information.

Example

See persistence.

delay-updates-until-end-of-tx

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

Set this element to true (the default) to update the persistent store of all beans in a transaction at the completion of the transaction. This generally improves performance by avoiding unnecessary updates. However, it does not preserve the ordering of database updates within a database transaction.

If your datastore uses an isolation level of TRANSACTION_READ_UNCOMMITTED, you may want to allow other database users to view the intermediate results of in-progress transactions. In this case, set delay-updates-until-end-of-tx to false to update the bean's persistent store at the conclusion of each method invoke. See ejbLoad() and ejbStore() Behavior for Entity EJBs for more information.

Note: Setting delay-updates-until-end-of-tx to false does not cause database updates to be "committed" to the database after each method invoke; they are only sent to the database. Updates are committed or rolled back in the database only at the conclusion of the transaction.

Example

The following entry specifies that WebLogic Server call ejbStore() at the end of each method invocation:

<entity-descriptor>

  <persistence>

    <delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>

  </persistence>

</entity-descriptor>

description

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-enterprise-bean,
     transaction-isolation
          method

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The description element is used to provide text that describes the parent element.

Example

destination-jndi-name

Range of values:

 

Valid JNDI name

 

Default value:

 

n/a

 

Requirements:

 

Required in message-driven-descriptor.

 

Parent elements:

 

weblogic-enterprise-bean
     message-driven-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

destination-jndi-name specifies the JNDI name of an actual JMS Queue or Topic available in WebLogic Server.

Example

See message-driven-descriptor.

ejb-name

Range of values:

 

Name of an EJB defined in ejb-jar.xml

 

Default value:

 

n/a

 

Requirements:

 

Required element in method stanza.

 

Parent elements:

 

weblogic-enterprise-bean
     transaction-isolation
          method

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

ejb-name specifies the name of an EJB to which WebLogic Server applies isolation level properties.

Example

See method.

ejb-reference-description

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     reference-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The resource-description stanza maps a resource reference defined in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.

Example

The resource-description stanza can contain additional elements as shown here:

<reference-descriptor>

  <ejb-reference-description>

    <ejb-ref-name>...</ejb-ref-name>

    <jndi-name>...</jndi-name>

  </ejb-reference-description>

</reference-descriptor>

ejb-ref-name

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     reference-description
          ejb-reference-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The resource-description stanza maps a resource reference named in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.

Example

The resource-description stanza can contain additional elements as shown here:

<reference-descriptor>

  <ejb-reference-description>

    <ejb-ref-name>. . .</ejb-ref-name>

    <jndi-name>. . .</jndi-name>

  </ejb-reference-description>

</reference-descriptor>

enable-call-by-reference

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     reference-description

          ejb-reference-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

By default, EJB methods called from within the same server pass arguments by reference. This increases the performance of method invocation because parameters are not copied.

If you set enable-call-by-reference to False parameters to EJB methods are copied (pass-by-value) in accordance with the EJB 1.1 specification. Pass by value is always necessary when the EJB is called remotely (not from within the server).

Example

The following example enables pass-by-value for EJB methods:

<weblogic-enterprise-bean>

  <ejb-name>AccountBean</ejb-name>

  ...

  <enable-call-by-reference>false</enable-call-by-reference>

</weblogic-enterprise-bean>

entity-cache

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

The entity-cache stanza is optional, and is valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The entity-cache element defines options used to cache entity EJB instances within WebLogic Server. See EJB Life Cycle in WebLogic Server for a general discussion of the caching services available in WebLogic Server.

Example

<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>

  <lifecycle>...</lifecycle>

  <persistence>...</persistence>

  <entity-clustering>...</entity-clustering>

</entity-descriptor>

entity-clustering

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element. Valid only for entity EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The entity-clustering stanza contains elements that determines how WebLogic Server replicates entity EJB instances in a cluster.

Example

The following excerpt shows the structure of a entity-clustering stanza:

<entity-clustering>

  <home-is-clusterable>true</home-is-clusterable>

  <home-load-algorithm>random</home-load-algorithm>

  <home-call-router-class-name>beanRouter</home-call-router-class-name>

</entity-clustering>

entity-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

One entity-descriptor stanza is required for each entity EJB in the .jar.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The entity-descriptor stanza defines caching, clustering, and persistence properties for entity EJBs in WebLogic Server.

Example

The following example shows the structure of the entity-descriptor stanza:

<entity-descriptor>

  <entity-cache>...</entity-cache>

  <lifecycle>...</lifecycle>

  <persistence>...</persistence>

  <entity-clustering>...</entity-clustering>

</entity-descriptor>

finders-load

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element. Valid only for CMP entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

-bean

Function

finders-load-bean determines whether WebLogic Server loads the EJB into the cache after a call to a finder method returns a reference to the bean. If you set this element to true, WebLogic immediately loads the bean into the cache if a reference to a bean is returned by the finder. If you set this element to false, WebLogic Server does not load automatically load the bean into the cache until the first method invocation; this behavior is consistent with the EJB 1.1 specification.

Example

The following entry specifies that EJBs are loaded into the WebLogic Server cache automatically when a finder method returns a reference to the bean:

<entity-descriptor>

  <persistence>

    <finders-load-bean>true</finders-load-bean>

  </persistence>

</entity-descriptor>

home-call-router-class-name

Range of values:

 

Valid router class name

 

Default value:

 

n/a

 

Requirements:

 

Optional element. Valid only for entity EJBs and stateful session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-clustering

and

weblogic-enterprise-bean
     stateful-session-descriptor
          stateful-session-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

home-call-router-class-name specifies the name of a custom class to use for routing bean method calls. This class must implement weblogic.rmi.extensions.CallRouter(). If specified, an instance of this class is called before each method call. The router class has the opportunity to choose a server to route to based on the method parameters. The class returns either a server name or null, which indicates that the current load algorithm should select the server.

Example

See entity-clustering and stateful-session-clustering.

home-is-clusterable

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element. Valid only for entity EJBs and stateful session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-clustering

and

weblogic-enterprise-bean
     stateful-session-descriptor
          stateful-session-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

When home-is-clusterable is true, the EJB can be deployed from multiple WebLogic Servers in a cluster. Calls to the home stub are load-balanced between the servers on which this bean is deployed, and if a server hosting the bean is unreachable, the call automatically fails over to another server hosting the bean.

Example

See entity-clustering.

home-load-algorithm

Range of values:

 

round-robin | random | weight-based

 

Default value:

 

Value of weblogic.cluster.defaultLoadAlgorithm

 

Requirements:

 

Optional element. Valid only for entity EJBs and stateful session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-clustering

and

weblogic-enterprise-bean
     stateful-session-descriptor
          stateful-session-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

home-load-algorithm specifies the algorithm to use for load balancing between replicas of the EJB home. If this property is not defined, WebLogic Server uses the algorithm specified by the server property, weblogic.cluster.defaultLoadAlgorithm.

You can define home-load-algorithm as one of the following values:

Example

See entity-clustering and stateful-session-clustering.

idle-timeout-seconds

Range of values:

 

1 to maxSeconds

 

Default value:

 

600

 

Requirements:

 

Optional element

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-cache

and

weblogic-enterprise-bean,
     stateful-session-descriptor,
          stateful-session-cache

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

idle-timeout-seconds defines the maximum length of time a stateful EJB should remain in the cache. After this time has elapsed, WebLogic Server may remove the bean instance if the number of beans in cache approaches the limit of max-beans-in-cache. See EJB Life Cycle in WebLogic Server for more information.

Example

The following entry indicates that the stateful session EJB, AccountBean, should become eligible for removal if max-beans-in-cache is reached and the bean has been in cache for 20 minutes:

<weblogic-enterprise-bean>

  <ejb-name>AccountBean</ejb-name>

  <stateful-session-descriptor>

    <entity-cache>

      <max-beans-in-cache>200</max-beans-in-cache>

      <idle-timeout-seconds>1200</idle-timeout-seconds>

    </entity-cache>

  </stateful-session-descriptor>

</weblogic-enterprise-bean>

initial-beans-in-free-pool

Range of values:

 

0 to maxBeans

 

Default value:

 

0

 

Requirements:

 

Optional element. Valid only for stateless session EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     transaction-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

If you specify a value for initial-beans-in-free-pool, you set the intital size ofthe pool. WebLogic Server populates the free pool with the specified number of bean instances for every bean class at startup. Populating the free pool in this way improves initial response time for the EJB, because initial requests for the bean can be satisfied without generating a new instance.

Example

See pool.

is-modified-method-name

Range of values:

 

Valid entity EJB method name

 

Default value:

 

None

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

is-modified-method-name specifies a method that WebLogic Server calls when the EJB is stored. The specified method must return a boolean value. If no method is specified, WebLogic Server always assumes that the EJB has been modified and always saves it.

Providing a method and setting it as appropriate can improve performance for EJB 1.1-compliant beans, and for beans that use bean-managed persistence. However, any errors in the method's return value can cause data inconsistency problems. See Using is-modified-method-name to Limit Calls to ejbStore() for more information.

Note: isModified() is no longer required for 2.0 CMP entity EJBs based on the EJB 2.0 specification However, it still applies to BMP and 1.1 CMP EJBs. When you deploy EJB 2.0 entity beans with container-managed persistence, WebLogic Server automatically detects which EJB fields have been modified, and writes only those fields to the underlying datastore.

Example

The following entry specifies that the EJB method named semidivine will notify WebLogic Server when the EJB has been modified:

<entity-descriptor>

  <persistence>

    <is-modified-method-name>isModified</is-modified-method-name>

  </persistence>

</entity-descriptor>

isolation-level

Range of values:

 

Serializable | ReadCommitted | ReadUncommitted | RepeatableRead

 

Default value:

 

n/a

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean,
     transaction-isolation

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

isolation-level specifies the isolation level for all of the EJB's database operations. The following are possible values for isolation-level:

Refer to your database documentation for more information on the implications and support for different isolation levels.

Example

See transaction-isolation.

jndi-name

Range of values:

 

Valid JNDI name

 

Default value:

 

n/a

 

Requirements:

 

Required in resource-description and ejb-reference-description.

 

Parent elements:

 

weblogic-enterprise-bean

and

weblogic-enterprise-bean
     reference-description
          resource-description

and

weblogic-enterprise-bean
     reference-description
          ejb-reference-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

jndi-name specifies the JNDI name of an actual EJB or resource available in WebLogic Server.

Example

See resource-description and ejb-reference-description.

lifecycle

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

The lifecycle stanza is optional. lifecycle is valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor

and

weblogic-enterprise-bean

     stateful-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The lifecycle stanza defines properties that affect the lifecycle of entity EJB instances within WebLogic Server. Currently, the lifecycle stanza includes only one element: passivation-strategy.

Example

<entity-descriptor>

  <lifecycle>

    <passivation-strategy>...</passivation-strategy>

  </lifecycle>

</entity-descriptor>

max-beans-in-cache

Range of values:

 

1 to maxBeans

 

Default value:

 

100

 

Requirements:

 

Optional element

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-cache

and

weblogic-enterprise-bean
     stateful-session-descriptor
          stateful-session-cache

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The max-beans-in-cache element specifies the maximum number of objects of this class that are allowed in memory. When max-bean-in-cache is reached, WebLogic Server passivates some EJBs that have not been recently used by a client. max-beans-in-cache also affects when EJBs are removed from the WebLogic Server cache, as described in Locking and Caching Services for Entity EJBs.

Example

The following entry enables WebLogic Server to cache a maximum of 200 instances of the AccountBean class:

<weblogic-enterprise-bean>

  <ejb-name>AccountBean</ejb-name>

  <entity-descriptor>

    <entity-cache>

      <max-beans-in-cache>200</max-beans-in-cache>

    </entity-cache>

  </entity-descriptor>

</weblogic-enterprise-bean>

max-beans-in-free-pool

Range of values:

 

0 to maxBeans

 

Default value:

 

max Int

 

Requirements:

 

Optional element. Valid only for stateless session EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor,
pool

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

WebLogic Server maintains a free pool of EJBs for every stateless session bean and message driven bean class. The max-beans-in-free-pool element defines the size of this pool. By default, max-beans-in-free-pool has no limit; the maximum number of beans in the free pool is limited only by the available memory. See Stateless Session EJB Life Cycle or Differences Between Message-Driven Beans and Stateless Session EJBs for more information.

Example

See pool.

message-driven-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

One message-driven-descriptor stanza is required for each message-driven bean in the .jar.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The message-driven-descriptor stanza associates a message-driven bean with a JMS destination in WebLogic Server. This stanza currently includes only one XML element, destination-jndi-name.

Example

The following example shows the structure of the message-driven-descriptor stanza:

<message-driven-descriptor>

  <destination-jndi-name>...</destination-jndi-name>

</message-driven-descriptor>

method

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element. You can specify more than one method stanza to configure multiple EJB methods.

 

Parent elements:

 

weblogic-enterprise-bean

     transaction-isolation

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The method stanza defines method-level transaction isolation settings for an EJB.

Example

The method stanza can contain the elements shown here:

<method>

  <description>...</description>

  <ejb-name>...</ejb-name>

  <method-intf>...</method-intf>

  <method-name>...</method-name>

  <method-params>...</method-params>

</method>

method-intf

Range of values:

 

Home | Remote

 

Default value:

 

n/a

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     transaction-isolation
          method

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

method-intf specifies the EJB interface to which WebLogic Server applies isolation level properties. Use this element only if you need to differentiate between methods having the same signature in the EJB's home and remote interface.

Example

See method.

method-name

Range of values:

 

Name of an EJB defined in ejb-jar.xml | *

 

Default value:

 

n/a

 

Requirements:

 

Required element in method stanza.

 

Parent elements:

 

weblogic-enterprise-bean
     transaction-isolation
          method

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

method-name specifies the name of an individual EJB method to which WebLogic Server applies isolation level properties. Use the asterisk (*) to specify all methods in the EJB's home and remote interfaces.

If you specify a method-name, the method must be available in the specified ejb-name.

Example

See method.

method-param

Range of values:

 

Fully qualified Java type of a method parameter

 

Default value:

 

n/a

 

Requirements:

 

Required element in method-params.

 

Parent elements:

 

weblogic-enterprise-bean

     transaction-isolation
          method
               method-params

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The method-param stanza specifies the fully-qualified Java type of a method parameter.

Example

See method-params.

method-params

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional stanza.

 

Parent elements:

 

weblogic-enterprise-bean

     transaction-isolation
          method

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The method-params stanza contains one or more elements that define the Java type name of each of the method's parameters.

Example

The method-params stanza contains one or more method-param elements, as shown here:

<method-params>

  <method-param>java.lang.String</method-param>

  ...

</method-params>

passivation-strategy

Range of values:

 

default | transaction

 

Default value:

 

default

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          lifecycle

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The passivation-strategy element determines whether or not WebLogic Server maintains the intermediate state of entity EJBs in its cache. See Locking and Caching Services for Entity EJBs for more information.

Example

The following entry reverts to WebLogic Server locking and caching behavior:

<entity-descriptor>

  <lifecycle>

    <passivation-strategy>default</passivation-strategy>

  </lifecycle>

</entity-descriptor>

persistence

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The persistence stanza defines properties that determine the persistence type, transaction commit behavior, and ejbLoad() and ejbStore() behavior for entity EJBs in WebLogic Server.

Example

<entity-descriptor>

  <persistence>

    <is-modified-method-name>...</is-modified-method-name>

    <delay-updates-until-end-of-tx>...</delay-updates-until-end-of-tx>

    <finders-load-beand>...</finders-load-bean>

    <persistence-type>...</persistence-type>

    <db-is-shared>false</db-is-shared>

    <persistence-use>...</persistence-use>

  </persistence>

</entity-descriptor>

persistence-type

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The persistence-type stanza defines a persistence service that the entity EJB can use. You can define multiple persistence-type stanzas in weblogic-ejb-jar.xml for testing your EJB with multiple persistence services. Only the persistence type defined in persistence-use is actually used during deployment.

persistence-type includes several elements that identify the persistence types:

Example

The following excerpt shows a sample persistence-type stanza:

<persistence>

  <persistence-type>

    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>

    <type-version>5.1.0</type-version>

    <type-storage>META-INF\weblogic-cmp-rdbms-jar.xml</type-storage>

  </persistence-type>

</persistence>

persistence-use

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The persistence-use stanza is similar to persistence-type, but it defines the persistence service actually used during deployment. persistence-use uses the type-identifier and type-version elements defined in a persistence-type to identify the service.

Example

To deploy an EJB using the WebLogic Server RDBMS-based persistence service defined in persistence-type, use the following persistence-use stanza:

<persistence-use>

  <type-identifier>WebLogic_CMP_RDBMS</type-identifier>

  <type-version>5.1.0</type-version>

</persistence-use>

persistent-store-dir

Range of values:

 

Fully qualified filesystem path

 

Default value:

 

n/a

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean

     stateful-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The persistent-store-dir element specifies a file system directory where WebLogic Server stores the state of passivated stateful session bean instances.

Example

See stateful-session-descriptor.

pool

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     stateless-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The pool stanza configures the behavior of the WebLogic Server free pool for a stateless session and message driven EJBs.

Example

The pool stanza can contain the elements shown here:

<stateless-session-descriptor>

  <pool>

    <max-beans-in-free-pool>500</max-beans-in-free-pool>

    <initial-beans-in-free-pool>250</initial-beans-in-free-pool>

  </pool>

</stateless-session-descriptor>

principal-name

Range of values:

 

valid WebLogic Server principal name

 

Default value:

 

n/a

 

Requirements:

 

At least one principal-name is required in the security-role-assignment stanza. You may define more than one principal-name for each role-name.

 

Parent elements:

 

weblogic-enterprise-bean
     security-role-assignment

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

principal-name specifies the name of an actual WebLogic Server principal to apply to the specified role-name.

Example

See security-role-assignment.

read-timeout-seconds

Range of values:

 

0 to maxSeconds

 

Default value:

 

0

 

Requirements:

 

Optional element. Valid only for entity EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          entity-cache

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

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 0, and WebLogic Server calls ejbLoad() only when the bean is brought into the cache.

Example

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>

reference-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The reference-descriptor stanza maps references in the ejb-jar.xml file to the JNDI names of actual resource factories and EJBs available in WebLogic Server.

Example

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>

replication-type

Range of values:

 

InMemory | None

 

Default value:

 

None

 

Requirements:

 

Optional element. Valid only for stateful session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean
     stateful-session-descriptor
          stateful-session-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The replication-type element determines whether or not WebLogic Server replicates the state of stateful session EJBs across WebLogic Server instances in a cluster. If you select InMemory, the state of the EJB is replicated. If you select None, the state is not replicated.

Example

See stateful-session-clustering.

res-env-ref-name

Range of values:

 

A valid resource environment reference name from the ejb-jar.xml file

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-enterprise-bean
     reference-descriptor
          resource-env-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

res-env-ref-name specifies a resource environment reference name.

Example

See resource-env-description.

res-ref-name

Range of values:

 

A valid resource reference name from the ejb-jar.xml file

 

Default value:

 

n/a

 

Requirements:

 

Required element if the EJB specifies resource references in ejb-jar.xml

 

Parent elements:

 

weblogic-enterprise-bean
     reference-description
          resource-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

res-ref-name specifies a resource reference name. This is the reference that the EJB provider places within the ejb-jar.xml deployment file.

Example

See resource-description.

resource-env-description

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     reference-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The resource-env-description stanza maps a resource environment reference defined in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.

Example

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-description

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean
     reference-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The resource-description stanza maps a resource reference defined in ejb-jar.xml to the JNDI name of an actual resource available in WebLogic Server.

Example

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>

role-name

Range of values:

 

An EJB role name defined in ejb-jar.xml

 

Default value:

 

n/a

 

Requirements:

 

Required element in security-role-assignment.

 

Parent elements:

 

weblogic-enterprise-bean
     security-role-assignment

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

role-name identifies an application role name that the EJB provider placed in the ejb-jar.xml deployment file. Subsequent principal-name elements in the stanza map WebLogic Server principals to the specified role-name.

Example

See security-role-assignment.

run-as-identity-principal

Range of values:

 

Principal that will be used as the identity as defined in ejb-jar.xml

 

Default value:

 

n/a

 

Requirements:

 

Required element in security-role-assignment.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

run-as-identity-principal specifies the principal to be used as the identity for beans that have a security-identity.run-as-specified-identity set in the ejb-jar.xml.

The principal named in this element must be one of the principals mapped to the run-as-specified-identity role.

Example

The run-as-identity-principal stanza can contain additional elements as shown here:

<weblogic-ejb-jar>

  <weblogic-enterprise-bean>

      <run-as-identity-principal>Fred</run-as-identity-principal>

  </weblogic-enterprise-bean>

</weblogic-ejb-jar>

security-role-assignment

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Required element if ejb-jar.xml defines application roles.

 

Parent elements:

 

weblogic-ejb-jar

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The security-role-assignment stanza maps application roles in the ejb-jar.xml file to the names of security principals available in WebLogic Server.

Example

The security-role stanza can contain one or more of the following elements:

<security-role-assignment>

  <role-name>PayrollAdmin</role-name>

  <principal-name>Tanya</principal-name>

  <principal-name>system</principal-name>

  ...

</security-role-assignment>

stateful-session-cache

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

The stateful-session-cache stanza is optional, and is valid only for stateful session EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateful-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The stateful-session-cache stanza defines properties used to cache stateful session EJB instances within WebLogic Server. See EJB Life Cycle in WebLogic Server for a general discussion of the caching services available in WebLogic Server.

Example

<stateful-session-cache>

  <max-beans-in-cache>...</max-beans-in-cache>

  <idle-timeout-seconds>...</idle-timeout-seconds>

  <read-timeout-seconds>...<read-timeout-seconds>

</stateful-session-cache>

stateful-session-clustering

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element. Valid only for stateful session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateful-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The stateful-session-clustering stanza contains elements that determine how WebLogic Server replicates stateful session EJB instances in a cluster.

Example

The following excerpt shows the structure of a entity-clustering stanza:

<stateful-session-clustering>

  <home-is-clusterable>true</home-is-clusterable>

  <home-load-algorithm>random</home-load-algorithm>

  <home-call-router-class-name>beanRouter</home-call-router-class-name>

  <replication-type>InMemory</replication-type>

</stateful-session-clustering>

stateful-session-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

One stateful-session-descriptor stanza is required for each stateful session EJB in the .jar.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The stateful-session-descriptor stanza defines caching, clustering, and persistence properties for stateful session EJBs in WebLogic Server.

Example

The following example shows the structure of the stateful-session-descriptor stanza:

<stateful-session-descriptor>

  <stateful-session-cache>...</stateful-session-cache>

  <lifecycle>...</lifecycle>

  <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>

stateless-bean-call-router-class-name

Range of values:

 

Valid router class name

 

Default value:

 

n/a

 

Requirements:

 

Optional element. Valid only for stateless session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor
          stateless-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

stateless-bean-call-router-class-name specifies the name of a custom class to use for routing bean method calls. This class must implement weblogic.rmi.extensions.CallRouter(). If specified, an instance of this class is called before each method call. The router class has the opportunity to choose a server to route to based on the method parameters. The class returns either a server name or null, which indicates that the current load algorithm should select the server.

Example

See stateless-clustering.

stateless-bean-is-clusterable

Range of values:

 

true | false

 

Default value:

 

true

 

Requirements:

 

Optional element. Valid only for stateless session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor
          stateless-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

When stateless-bean-is-clusterable is true, the EJB can be deployed from multiple WebLogic Servers in a cluster. Calls to the home stub are load-balanced between the servers on which this bean is deployed, and if a server hosting the bean is unreachable, the call automatically fails over to another server hosting the bean.

Example

See stateless-clustering.

stateless-bean-load-algorithm

Range of values:

 

round-robin | random | weight-based

 

Default value:

 

Value of weblogic.cluster.defaultLoadAlgorithm

 

Requirements:

 

Optional element. Valid only for stateless session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor
          stateless-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

stateless-bean-load-algorithm specifies the algorithm to use for load balancing between replicas of the EJB home. If this property is not defined, WebLogic Server uses the algorithm specified by the server property, weblogic.cluster.defaultLoadAlgorithm.

You can define stateless-bean-load-algorithm as one of the following values:

Example

See stateless-clustering.

stateless-bean-methods-are-idempotent

Range of values:

 

true | false

 

Default value:

 

false

 

Requirements:

 

Optional element. Valid only for stateless session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor
          stateless-clustering

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

You can set this element to either true or false. Set stateless-bean-methods-are-idempotent to "true" only if the bean is written such that repeated calls to the same method with the same arguments has exactly the same effect as a single call. This allows the failover handler to retry a failed call without knowing whether the call actually completed on the failed server. Setting this property to true makes it possible for the bean stub to recover automatically from any failure as long as another server hosting the bean can be reached.

Example

See stateless-clustering.

stateless-clustering

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element. Valid only for stateless session EJBs in a cluster.

 

Parent elements:

 

weblogic-enterprise-bean,
     stateless-session-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The stateless-clustering stanza contains elements that determine how WebLogic Server replicates stateless session EJB instances in a cluster.

Example

The following excerpt shows the structure of a stateless-clustering stanza:

<stateless-clustering>

  <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>

  <stateless-bean-load-algorithm>random</stateless-bean-load-algorithm>

  <stateless-bean-call-router-class-name>beanRouter</stateless-bean-call-router-class-name>

  <stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idempotent>

</stateless-clustering>

stateless-session-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

One stateless-session-descriptor stanza is required for each stateless session EJB in the .jar.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The stateless-session-descriptor stanza defines caching, clustering, and persistence properties for stateless session EJBs in WebLogic Server.

Example

The following example shows the structure of the stateless-session-descriptor stanza:

<stateless-session-descriptor>

  <pool>...</pool>

  <stateless-clustering>...</stateless-clustering>

</stateless-session-descriptor>

transaction-descriptor

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

weblogic-enterprise-bean

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The transaction-descriptor stanza contains elements that define transaction behavior in WebLogic Server. Currently, this stanza includes only one element: trans-timeout-seconds.

Example

The following example shows the structure of the transaction-descriptor stanza:

<transaction-descriptor>

  <trans-timeout-seconds>20</trans-timeout-seconds>

<transaction-descriptor>

transaction-isolation

Range of values:

 

n/a (XML stanza)

 

Default value:

 

n/a (XML stanza)

 

Requirements:

 

Optional element.

 

Parent elements:

 

transaction-description

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The transaction-isolation defines method-level transaction isolation settings for an EJB.

Example

The transaction-isolation stanza can contain the elements shown here:

<transaction-isolation>

  <isolation-level>Serializable</isolation-level>

  <method>

    <description>...</description>

    <ejb-name>...</ejb-name>

    <method-intf>...</method-intf>

    <method-name>...</method-name>

    <method-params>...</method-params>

  </method>

</transaction-isolation>

trans-timeout-seconds

Range of values:

 

0 to max

 

Default value:

 

30

 

Requirements:

 

Optional element. Valid only for all EJBs.

 

Parent elements:

 

weblogic-enterprise-bean,
     transaction-descriptor

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

The trans-timeout-seconds element specifies the maximum duration for an EJB's container-initiated transactions. If a transaction lasts longer than trans-timeout-seconds, WebLogic Server rolls back the transaction.

Example

See transaction-descriptor.

type-identifier

Range of values:

 

Valid string

 

Default value:

 

n/a

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

               persistence-type

and

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

               persistence-use

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

type-identifier contains text that identifies an entity EJB persistence type. WebLogic Server RDBMS-based persistence uses the identifier, WebLogic_CMP_RDBMS. If you use a different persistence vendor, consult the vendor's documentation for information on the correct type-identifier.

Example

See persistence-type for an example that shows the complete persistence-type definition for WebLogic Server RDBMS-based persistence.

type-storage

Range of values:

 

Valid string

 

Default value:

 

n/a

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

               persistence-type

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

type-storage defines the full path of the file that stores data for this persistence type. The path must specify the file's location relative to the top level of the EJB's .jar deployment file or deployment directory.

WebLogic Server RDBMS-based persistence generally uses an XML file named weblogic-cmp-rdbms-jar.xml to store persistence data for a bean. This file is stored in the META-INF subdirectory of the .jar file.

Example

See persistence-type for an example that shows the complete persistence-type definition for WebLogic Server RDBMS-based persistence.

type-version

Range of values:

 

Valid string

 

Default value:

 

n/a

 

Requirements:

 

Required only for entity EJBs that use container-managed persistence services.

 

Parent elements:

 

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

               persistence-type

and

weblogic-enterprise-bean,
     entity-descriptor,
          persistence

               persistence-use

 

Deployment file:

 

weblogic-ejb-jar.xml

 

Function

type-version identifies the version of the specified persistence type.

Note: If you use WebLogic Server RDBMS-based persistence, the specified version must exactly match the RDBMS persistence version for the WebLogic Server release. Specifying an incorrect version results in the error:

weblogic.ejb.persistence.PersistenceSetupException: Error initializing the CMP Persistence Type for your bean: No installed Persistence Type matches the signature of (identifier `Weblogic_CMP_RDBMS', version `version_number').

Example

See persistence-type for an example that shows the complete persistence-type definition for WebLogic Server RDBMS-based persistence.

weblogic-cmp-rdbms-jar.xml Deployment Descriptor File

weblogic-cmp-rdbms-jar.xml defines deployment properties for a entity EJBs that uses WebLogic Server RDBMS-based persistence services. The EJB 2.0 container uses a version of weblogic-cmp-rdbms-jar.xml that is different from the one shipped with WebLogic Server Version 5.1. See Persistence Services for more information.

You can continue to use the earlier weblogic-cmp-rdbms-jar.xml DTD for EJB 1.1 beans that you will deploy on the WebLogic Server Version 6.0. However, if you want to use any of the new CMP 2.0 features, you must use the DTD described in the sections listed in Index of weblogic-cmp-rdbms-jar.xml Deployment Elements.

Index of weblogic-cmp-rdbms-jar.xml Deployment Elements

cmp-field

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

Field is case sensitive and must match the name of the field in the bean and must also have a cmp-entry entry in the ejb-jar.xml.

 

Parent elements:

 

weblogic-rdbms-bean
     field-map
weblogic-rdbms-relation
     field-group

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

This name specifies the mapped field in the bean instance which should be populated with information from the database.

Example

See field-map.

cmr-field

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

The field referenced in cmr-field must have a matching cmr-field entry in the ejb-jar.xml.

 

Parent elements:

 

weblogic-rdbms-relation

     field-group

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The cmr-field element specifies the name of a cmr-field.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

      <field-group>employee</field-group>

        <cmp-field>employee stock purchases</cmp-field>

        <cmr-field>stock options</cmr-field>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>

column-map

Range of values:

 

n/a.

 

Default value:

 

n/a

 

Requirements:

 

The value of a key-column entry that refers to a remote bean must always be empty.

 

Parent elements:

 

weblogic-rdbms-bean
     weblogic-relationship-role

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

This element represents the mapping of a foreign key column in one table in a database to a corresponding primary key. The two columns may or may not be in the same table. The tables to which the column belong are implicit from the context in which the column-map element appears in the deployment descriptor.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<column-map
<foreign-key-column>account-id</foreign-key-column>
<key-column>id</key-column>
</column-map>

  </weblogic-rdbms-bean>
</weblogic-rdbms-jar>

data-source-name

Range of values:

 

Valid name of the data source used for all data base connectivity for this bean.

 

Default value:

 

n/a

 

Requirements:

 

Must be defined as a standard WebLogic Server JDBC data source for database connectivity. See Programming WebLogic JDBC for more information.

 

Parent elements:

 

weblogic-rdbms-bean

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The data-source-name that specifies the JDBC data source name to be used for all database connectivity for this bean.

Example

See table-name.

dbms-column

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

dbms-column is case maintaining, although not all databases require case sensitive entires.

 

Parent elements:

 

weblogic-rdbms-bean
     field-map

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The name of the database column to which the field should be mapped.

Example

See field-map.

ejb-name

Range of values:

 

Valid name of an EJB.

 

Default value:

 

n/a

 

Requirements:

 

Must match the ejb-name of the cmp entity bean defined in the ejb-jar.xml.

 

Parent elements:

 

weblogic-rdbms-bean

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The name that specifies an EJB as defined in the ejb-cmp-rdbms.xml. This name must match the ejb-name of a cmp entity bean contained in the ejb-jar.xml.

Example

See table-name.

field-group

Range of values:

 

Valid name

 

Default value:

 

A special group named default is used for finders and relationships that have no group specified.

 

Requirements:

 

The default group contains all of a bean's cmp fields, but none of its cmr fields.

 

Parent elements:

 

weblogic-rdbms-relation

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The field-group element represents a subset of the cmp and cmr fields of a bean. Related fields in a bean can be put into groups that are faulted into memory together as a unit. A group can be associated with a finder or relationship, so that when a bean is loaded as the result of executing a finder or following a relationship, only the fields specified in the group are loaded.

A field may belong to multiple groups. In this case, the getXXX method for the field faults in the first group that contains the field.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

      <field-group>employee</field-group>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>

field-map

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

Field mapped to the column in the database must correspond to a cmp field in the bean.

 

Parent elements:

 

weblogic-rdbms-bean

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The name of the mapped field for a particular column in a database that corresponds to a cmp field in the bean instance.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>
<weblogic-rdbms-bean>

  <field-map>
<cmp-field>accountId</cmp-field>
<dbms-column>id</dbms-column>
</field-map>

  <field-map>
<cmp-field>balance</cmp-field>
<dbms-column>bal</dbms-column>
</field-map>

    <field-map>
<cmp-field>accountType</cmp-field>
<dbms-column>type</dbms-column>
</field-map>

  </weblogic-rdbms-bean>
</weblogic-rdbms-jar>

foreign-key-column

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

Must correspond to a column of a foreign key.

 

Parent elements:

 

weblogic-rdbms-bean
     column-map

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The foreign-key-column element represents a column of a foreign key in the database.

Example

See column-map.

group-name

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-relation

     field-group

weblogic-rdbms-bean

     finder

          finder-query

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The group-name element specifies the name of a field group.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

      <field-group>employee</field-group>

        <cmp-field>employee stock purchases</cmp-field>

        <cmr-field>stock options</cmr-field>

          <group-name>financial data</group-name>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>

key-column

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

Must correspond to a column of a primary key.

 

Parent elements:

 

weblogic-rdbms-bean
     column-map

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The key-column element represents a column of a primary key in the database.

Example

See column-map.

max-elements

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

     weblogic-query

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

max-elements specifies the maximum number of elements that should be returned by a multi-valued query.

Example

The XML stanza can contain the elements shown here:

   <max-elements>100</max-elements>

         <!ELEMENT max-element (PCDATA)>    

method-name

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

This element may not be used as a wildcard.

 

Parent elements:

 

weblogic-rdbms-bean

     query-method

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The method-name element specifies the name of a finder or ejbSelect method.

Example

See weblogic-query.

method-param

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

     method-params

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The method-param element contains the fully qualified Java type name of a method parameter.

Example

The XML stanza can contain the elements shown here:

<method-param>java.lang.String</method-param>

method-params

Range of values:

 

list of valid names

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

     query-method

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The method-params element contains an ordered list of the fully-qualified Java type names of the method parameters.

Example

See weblogic-query.

query-method

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The query-method element specifies the method that is associated with a weblogic-query. It also uses the same format as the ejb-jar.xml descriptor.

Example

See weblogic-query.

relation-name

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

Must match the ejb-relation-name of an ejb-relation in the associated ejb-jar.xml descriptor file.

 

Parent elements:

 

weblogic-rdbms-relation

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The relation-name element specifies the name of a relation.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

    <relation-name>stocks-holders</relation-name>

      <table-name>stocks</table-name>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>

relationship-role-name

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

The name must match the ejb-relationship-role-name of an ejb-relationship-role in the associated ejb-jar.xml descriptor file.

 

Parent elements:

 

weblogic-rdbms-relation
     weblogic-relationship-role

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The relationship-role-name element specifies the name of a relationship role.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

    <weblogic-relationship-role>stockholder</weblogic- relationship-role>

      <relationship-role-name>stockholders</relationship- role-name>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>

table-name

Range of values:

 

Valid, fully qualified SQL name of the source table in the database.

 

Default value:

 

n/a

 

Requirements:

 

table-name must be set in all cases.

 

Parent elements:

 

weblogic-rdbms-bean

     weblogic-rdbms-relation

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The fully qualified SQL name of the table. The user defined for the data-source for this bean must have read and write privileges for this table, but does not necessarily need schema modification privileges.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms.jar>

  <weblogic-rdbms-bean>

    <ejb-name>containerManaged</ejb-name>

    <data-source-name>examples-dataSource-demoPool</data-source-name>

    <table-name>ejbAccounts</table-name>

</weblogic-rdbms-bean>

</weblogic-rdbms-jar>

weblogic-ql

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

     weblogic-query

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The weblogic-ql element specifies a query that contains a WebLogic specific extension to EJB-QL. You should specify queries that only use standard EJB-QL language features in the ejb-jar.xml deployment descriptor.

Example

See weblogic-query.

weblogic-query

Range of values:

 

n/a

 

Default value:

 

n/a

 

Requirements:

 

n/a

 

Parent elements:

 

weblogic-rdbms-bean

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The weblogic-query element allows you to associate WebLogic specific attributes with a query, as necessary. For example, weblogic-query can be used to specify a query that contains a WebLogic specific extension to EJB-QL. Queries that do not take advantage of WebLogic extensions to EJB-QL should be specified in the ejb-jar.xml deployment descriptor.

Also, the weblogic-query element is used to associate a field-group with the query if the query retrieves an entity bean that should be pre-loaded into the cache by the query.

Example

The XML stanza can contain the elements shown here:

<weblogic-query>

        <query-method>

          <method-name>findBigAccounts</method-name>

          <method-params>

            <method-param>double</method-param>

          </method-params>

        <query-method>

        <weblogic-ql>WHERE BALANCE>10000 ORDERBY NAME</weblogic-ql>

    </weblogic-query>

weblogic-relationship-role

Range of values:

 

Valid name

 

Default value:

 

n/a

 

Requirements:

 

The mapping of a role to a table is specified in the associated weblogic-rdbms-bean and ejb-relation elements.

 

Parent elements:

 

weblogic-rdbms-relation

 

Deployment file:

 

weblogic-cmp-rdbms-jar.xml

 

Function

The weblogic-relationship-role element is used to express a mapping from a foreign key to a primary key. Only one mapping is specified for one-to-one relationships when the relationship is local. However, with a many-to-many relationship, you must specify two mappings

Multiple column mappings are specified for a single role, it the key is complex. No column-map is specified if the role is just specifying a group-name.

Example

The XML stanza can contain the elements shown here:

<weblogic-rdbms-jar>

  <weblogic-rdbms-relation>

    <relation-name>stocks-holders</relation-name>

      <table-name>stocks</table-name>

      <weblogic-relationship-role>stockholder </weblogic-relationship-role>

  </weblogic-rdbms-relation>

</weblogic-rdbms-jar>