@oc4j Tag Reference

Oracle Application Server (OC4J) specific tags for EJB.

Applies to: all EJB types

@oc4j Class Level Tags

@oc4j.bean

@oc4j Field Level Tags

@oc4j Class Level Tag Usage

@oc4j.bean (0..1)

All attributes of session-deployment, entity-deployment and message-driven-deployment are placed under this class level tag.

Applies to: All EJB types, class level

ParameterTypeApplicabilityDescriptionMandatory
jndi-nametextApplicable to session and entity beans This parameter specifies the JNDI name to be used for lookup. It uses the 'ejb-name' by default. false
pool-cache-timeoutintApplicable to session (stateless) and entity beans This parameter specifies how long (in seconds) to keep beans cached in the pool. For stateless session beans, if you specify a pool-cache-timeout, then at every pool-cache-timeout interval, all beans in the pool, of the corresponding bean type, are removed. If the value specified is zero or negative, then the pool-cache-timeout is disabled and beans are not removed from the pool.

Default value(s):

60
false
call-timeoutintApplicable to session and entity beans. This parameter specifies the maximum time (in milli seconds) to wait for any resource to make a business/life-cycle method invocation. This is not a timeout for how long a business method invocation can take. If the timeout is reached, a TimedOutException is thrown. This excludes database connections. Set to 0 if you want the timeout to be forever.

Default value(s):

90000
false
copy-by-valueboolApplicable to session and entity beans Whether or not to copy (clone) all the incoming/outgoing parameters in EJB calls. Set this to 'false' if you're certain your application doesn't assume copy-by-value semantics for a speed-up. The default is 'true'.

Default value(s):

true
false
max-instancesintApplicable to session (stateless) and entity beans The number of maximum bean implementation instances to be kept instantiated or pooled. The default is 100. This setting is valid for session beans (stateless) and entity beans only.

Default value(s):

100
false
min-instancesintApplicable to session (stateless) and entity beans The number of minimum bean implementation instances to be kept instantiated or pooled. The default is 0. This setting is valid for session (stateless) and entity beans only.

Default value(s):

0
false
max-instances-per-pkintApplicable to entity beans Sets the maximum entity bean wrapper instances allowed in its pool for a given primary key.

Default value(s):

50
false
min-instances-per-pkintApplicable to entity beans Sets the minimum entity bean wrapper instances allowed in its pool for a given primary key.

Default value(s):

0
false
max-tx-retriesintApplicable to session and entity beans The number of times to retry a transaction that was rolled back due to system-level failures. The default is 3.

Default value(s):

3
false
persistence-filenametextApplicable to session beans Path to file where sessions are stored across restarts. false
timeoutintapplicable to session beans Inactivity timeout in seconds. If the value is zero or negative timeouts will be disabled.

Default value(s):

0
false
clustering-schematextApplicable to entity beans. This parameter should be set to "asynchronous-cache" in order to cluster-enable an Entity bean.
Valid options are:

default

asynchronous-cache

Default value(s):

default
true
data-sourcetextApplicable to entity beans. The name of the data-source used if using container-managed persistence. Use the 'ejb-location' attribute of the data-source entry.

Default value(s):

jdbc/OracleDS
true
exclusive-write-accessboolApplicable to entity beans. Whether or not the EJB-server has exclusive write (update) access to the database backend. This can be used only for entity beans that use a "read_only" locking mode. In this case, it increases the performance for common bean operations and enables better caching. Default is false for beans with locking-mode=optimistic or pessimistic and true for locking-mode=read-only.

Default value(s):

Default is false for beans with locking-mode=optimistic or pessimistic and true for locking-mode=read-only.
false
instance-cache-timeoutintApplicable to entity beans. The amount of time in seconds that entity wrapper instances are assigned to an identity. If you specify 'never', you retain the wrapper instances until they are garbage collected. The default is 60 seconds.

Default value(s):

60
false
isolationtextApplicable to entity beans. Specifies the isolation-level for database actions. The valid values for Oracle databases are 'serializable' and 'committed'. The default is 'committed'. Non-Oracle databases can be the following: 'none', 'committed', 'serializable', 'uncommitted', and 'repeatable_reads'.

Default value(s):

committed
Valid options are:

none

committed

serializable

uncommitted

repeatable_reads

Default value(s):

committed
false
tabletextApplicable to entity beans. The name of the table in the database if using container-managed persistence. Applicable to entity beans. false
validity-timeoutintApplicable to entity beans. The maximum amount of time (in millis) that an entity is valid in the cache (before being reloaded). Useful for loosely coupled environments where rare updates from legacy systems occur. This attribute is only valid when exclusive-write-access="true" (the default). Applicable to entity beans. false
instance-cache-timeoutintApplicable to entity beans. The amount of time in seconds that entity wrapper instances are assigned to an identity. If you specify 'never', you retain the wrapper instances until they are garbage collected. The default is 60 seconds.

Default value(s):

60
false
do-select-before-insertboolApplicable to entity beans. Recommend setting to false to avoid the extra select before insert which checks if the entity already exists before doing the insert. This will then detect a duplicate, if there is one, during the insert. Default Value: true

Default value(s):

true
false
locking-modetextApplicable to entity beans. Configures the handling of resource contention and parallel execution within CMP entity beans. PESSIMISTIC uses "select for update" to manage resource contention and only allows one user at a time to execute the entity bean. OPTIMISTIC allows multiple users to execute the entity bean in parallel. It does not monitor resource contention; thus, the burden of the data consistency is placed on the database isolation modes. READ-ONLY allows multiple users to execute the entity bean in parallel. The container does not allow any updates to the bean's state. OLD_PESSIMISTIC is maintained for backward compatibility with OC4J 1.0.2.2 and for use with non-Oracle databases.
Valid options are:

pessimistic

optimistic

read-only

old_pessimistic

Default value(s):

optimistic
false
update-changed-fields-onlyboolApplicable to entity beans. Specifies whether the container updates only modified fields or all fields to persistence storage for CMP entity beans when ejbStore is invoked. The default is true, which specifies to only update modified fields.

Default value(s):

true
false
disable-wrapper-cacheboolApplicable to entity beans. If true, a pool of wrapper instances is not maintained. The default is true.

Default value(s):

true
false
delay-updates-until-commitboolApplicable to entity (CMP) beans. This attribute is valid only for CMP entity beans. Defers the flushing of transactional data until commit time or not. The default is true. Set this value to false to update persistence data after completion of every EJB method invocation - except ejbRemove() and the finder methods.

Default value(s):

false
false
connection-factory-locationtextApplicable to message driven beans. The JMS Destination Connection Factory is specified in the connection-factory-location attribute. The syntax for database queue/topic is "java:comp/resource" + resource provider name + "TopicConnectionFactories" or "QueueConnectionFactories" + user defined name. The xxxConnectionFactories details what type of factory is being defined. true
destination-locationtextApplicable to message driven beans. The JNDI location of the destination (queue/topic) to use. The JMS Destination is specified in the destination-location attribute. The syntax for database queue/topic is "java:comp/resource" + resource provider name + "Topics" or "Queues" + Destination name. The Topic or Queue details what type of Destination is being defined. The Destination name is the actual queue or topic name defined in the database. true
subscription-nametextApplicable to message driven beans. If this is a topic, the subscription name is defined in the subscription-name attribute. false
listener-threadsintApplicable to message driven beans. The listener threads are used to concurrently consume JMS messages. The default is one thread.

Default value(s):

1
false
transaction-timeoutintApplicable to message driven beans. This attribute controls the transaction timeout interval for any container-managed transactional MDB. The default is one day. If the transaction has not completed in this timeframe, the transaction is rolled back.

Default value(s):

1
false

@oc4j Method Level Tag Usage

@oc4j.field-persistence-manager (0..*)

If @oc4j.persistence field-persistence-manager specified and there's some properties for the persistence manager, specify it as one or more @oc4j.field-persistence-manager-property tags for the persistent field.

Applies to: Method level, entity beans

ParameterTypeApplicabilityDescriptionMandatory
classtext The class that implements a custom persistence handler for this CMP-field. false

@oc4j.field-persistence-manager-property (0..*)

Specify properties for field-persistence-manager. Must have a @oc4j.field-persistence-manager "class" param set.

Applies to: Method level, entity beans

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the property.false
valuetextThe value of the property.false

@oc4j.persistence (0..*)

Use these tags to specify persistence details for Container Managed Entity Beans.

Applies to: Applicable to entity (CMP) beans.

ParameterTypeApplicabilityDescriptionMandatory
persistence-nametextThe name of the field in the database table.false
persistence-typetextThe database type (valid values varies from database to database) of the field.false
table-nametextThe database table name for this fieldfalse
immutablebool Whether or not the value can be trusted to be immutable once added to the Collection/Map. Setting this to true will optimize database operations extensively. The default value is "true" for set-mapping and map-mappings and "false" for collection-mapping and list-mapping. false

@oc4j Field Level Tag Usage