Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring the weblogic-ejb-jar.xml File for BEA WebLogic Server

To deploy a TopLink application to a BEA WebLogic Server, modify the weblogic-ejb-jar.xml file as described in:

Avoid the weblogic-ejb-jar.xml tags that TopLink either does not support or does not require (see "Unsupported weblogic-ejb-jar.xml File Tags").

If you are migrating a BEA WEbLogic Server application to OC4J, you can use the TopLink migration tool to automatically migrate persistence information from your weblogic-ejb-jar.xml file to a new toplink-ejb-jar.xml file. For more information, see "Migrating BEA WebLogic Persistence to OC4J TopLink Persistence".

Configuring persistence-descriptor Entries

Within the weblogic-ejb-jar.xml file, each bean must have a persistence-descriptor entry with subentries, as follows:

  • Configure the persistence-descriptor entry with subentries that indicate TopLink is available and should be used:

    • If you deploy to WebLogic 6.1 (Service Pack 4), include a persistence-type element and a persistence-use element. Both elements require a type-identifier and a type-version tag. Table 8-6 lists the options for the type-identifier tag, and Table 8-7 lists the options for the type-version tag.

    • If you deploy to WebLogic 7.0 or 8.1, include a persistence-use element with a type-identifier and a type-version tag. Table 8-6 lists the options for the type-identifier tag, and Table 8-7 lists the options for the type-version tag.

  • If you use WebLogic 6.1, add the element type-storage to the persistence-type element, and set it to META-INF\toplink-ejb-jar.xml.

  • If you use WebLogic 7.0 or 8.1, add the element type-storage to the persistence-use element, and set it to META-INF\toplink-ejb-jar.xml. Set the enable-call-by-reference element to TRUE to enable call-by-reference:

    <weblogic-enterprise-bean>
        <ejb-name>AccountBean</ejb-name>
        ...
            <enable-call-by-reference>True</enable-call-by-reference>
        ...
    </weblogic-enterprise-bean>
    
    

Table 8-6 WebLogic type-identifier Settings

EJB Version XML Elements

1.1

<type-identifier>TopLink_CMP_1_1</type-identifier>

2.0

<type-identifier>TopLink_CMP_2_0</type-identifier>


Table 8-7 WebLogic type-version Settings

WebLogic EJB Version XML Elements

6.1

<type-version>4.0</type-version>

7.0

<type-version>4.5</type-version>

8.1

<type-version>9.0.4</type-version>



Note:

Although deprecated, the type-version setting of version 3.5 also functions correctly with WebLogic 6.1 (Service Pack 4) under EJB 1.1.

Unsupported weblogic-ejb-jar.xml File Tags

The weblogic-ejb-jar.xml file includes several tags that TopLink either does not support or does not require:

  • concurrency-strategy: This tag specifies how WebLogic manages concurrent users for a given bean. Because TopLink manages concurrent access internally, it does not require this tag.

    For more information about the TopLink concurrency strategy, see "Configuring Locking Policy".

  • db-is-shared: Because TopLink does not make any assumptions about the exclusivity of database access, TopLink does not require this tag. TopLink addresses multiuser access issues through various locking and refreshing policies.

  • delay-updates-until-end-of-tx: TopLink always delays updates until the end of a transaction, and does not require this tag.

  • finders-load-bean: TopLink always loads the bean upon execution of the finder, and does not require this tag.

  • pool: TopLink does not use a pooling strategy for entity beans. This avoids object-identity problems that can occur due to pooling.

  • lifecycle: This element manages beans that follow a pooling strategy. Because TopLink does not use a pooling strategy, TopLink ignores this tag.

  • is-modified-method-name: TopLink does not require a bean developer-defined method to detect changes in the object state.

  • isolation-level: Because isolation level settings for the cache or database transactions are specified in the TopLink project, TopLink ignores this tag.

  • cache: Because you define TopLink cache properties in TopLink Workbench, this tag is unnecessary.