Oracle TopLink Developer's Guide 10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
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".
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 |
|
2.0 |
|
Table 8-7 WebLogic type-version Settings
WebLogic EJB Version | XML Elements |
---|---|
6.1 |
|
7.0 |
|
8.1 |
|
Note: Although deprecated, thetype-version setting of version 3.5 also functions correctly with WebLogic 6.1 (Service Pack 4) under EJB 1.1. |
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.