Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) E13981-01 |
|
|
View PDF |
The <message-driven-deployment>
section provides additional deployment information for a message driven bean deployed within this JAR file.
The <message-driven-deployment>
section contains the following structure:
<message-driven-deployment cache-timeout=... connection-factory-location=... destination-location=... name=... subscription-name=... listener-threads=... transaction-timeout=... dequeue-retry-count=... dequeue-retry-interval=... interceptor-type=... > <env-entry-mapping name=...></env-entry-mapping> <ejb-ref-mapping location=... name=... remote=... jndi-properties=... /> <resource-ref-mapping location=... name=... > <lookup-context location=...> <context-attribute name=... value=... /> </lookup-context> </resource-ref-mapping> <resource-env-ref-mapping location=... name=... /> <message-destination-ref-mapping location=... name=... /> <config-property> <config-property-name> ... </config-property-name> <config-property-value> ... </config-property-value> </config-property> </message-driven-deployment>
Note: Alternatively, in an EJB 3.0 application, you can use the OC4J-proprietary annotation@MessageDrivenDeployment . You can use the orion-ejb-jar.xml file <message-driven-deployment> configuration to override @MessageDrivenDeployment configuration. For more information, see "Configuring OC4J-Proprietary Deployment Options on an EJB 3.0 MDB". |
For information on each of these elements and sub-elements, see: the following
A message-driven bean example, which includes the <message-driven-deployment>
element, is described in the following:
Table A-3 lists the attributes of the <message-driven-deployment>
element that you can use to configure message service options. This table also lists the following corresponding configuration alternatives:
attributes of the @MessageDrivenDeployment
annotation;
activation configuration property names that you can use in the following annotations and elements:
<config-property>
element owned by a <message-driven-deployment>
element;
@ActivationConfigProperty
annotation owned by a @MessageDrivenDeployment
or @MessageDriven
annotation.
Note: If you configure using attributes, your application can only access a message service provider without a J2CA resource adapter. If later you decide to access your message service provider using a J2CA resource adapter, your application will fail to deploy. If you configure using activation configuration properties, your application can access a message service provider with or without a J2CA resource adapter. Oracle recommends that you use<config-property> or @ActivationConfigProperty options. |
For more information, see the following:
Table A-3 Attributes for the <message-driven-deployment> Element
<message-driven-deployment> Attribute | @MessageDrivenDeployment Attribute | Description | Activation Configuration Property NameFoot 1 |
---|---|---|---|
poolCacheTimeout |
This parameter specifies how long to keep message-driven beans cached in the pool. If you specify a pool The default value is 60 (seconds). |
N/A |
|
N/A |
The JNDI location of the connection factory to use. The JMS |
See |
|
dequeueRetryCount |
Specifies how often the listener thread tries to re-acquire the JMS session once database failover has ocurred. This is applicable to only container-managed transactions in an MDB. The default value is For more information, see the following: |
N/A |
|
dequeueRetryInterval |
Specifies the interval between retries. The default value is 60 seconds. For more information, see the following: |
N/A |
|
destinationLocation |
The JNDI location of the destination (queue/topic) to use. The JMS |
See |
|
interceptorType |
The attribute indicates how OC4J handles interceptor class life cycle. You can set the interceptor type to When set to When set to For more information, see "Singleton Interceptors". |
N/A |
|
listenerThreads |
The listener threads are used to concurrently consume JMS messages. The default is one thread. Topics can only have one thread. Queues can have more than one. For more information, see "Configuring Parallel Message Processing". |
See |
|
maxDeliveryCount |
The maximum number of times OC4J will attempt the immediate redelivery of a message to a message-driven bean's For more information, see "Configuring Maximum Delivery Count". |
See |
|
maxInstances |
The maximum number of bean implementation instances to be kept instantiated or pooled. The default is To disable instance pooling, set For message-driven beans, the default pooling setting is typically appropriate. Change this value only if MDB life cycle methods are very expensive and you need fine-grained control over how often instances are created and managed in the pool. See "Configuring Bean Instance Pool Size" for more information. |
N/A |
|
minInstances |
The minimum number of bean implementation instances to be kept instantiated or pooled. The default value is See "Configuring Bean Instance Pool Size" for more information. |
N/A |
|
|
The name of the bean, which matches the name of a bean in the assembly section of the EJB deployment descriptor ( |
N/A |
|
resourceAdapter |
The name of the resource adapter instance that this MDB uses. Applicable only if this MDB is using a J2CA message service provider. In order for the MDB to be activated by messages received by the resource adapter, the MDB and resource adapter must be connected. For more information, see "Configuring a J2CA Resource Adapter for use With Your Message Service Provider". |
N/A |
|
subscriptionName |
The name of the topic to which this message-drive bean subscribes. |
See |
|
transactionTimeout |
This attribute controls the transaction timeout interval (in seconds) for any container-managed transactional MDB. The default is one day or 86,400 seconds. If the transaction has not completed in this time frame, the transaction is rolled back. This applies to both normal JMS and J2CA resource adapter-based message providers. For more information, see "Configuring a Transaction Timeout for a Message-Driven Bean" |
See |
Footnote 1 For use in a <message-driven-deployment>
element <config-property>
subelement, or in an @ActivationConfigProperty
annotation owned by a @MessageDrivenDeployment
or @MessageDriven
annotation.
The <env-entry-mapping>
element maps environment variables to JNDI names and is discussed in "Configuring an Environment Reference to an Environment Variable".
The <ejb-ref-mapping>
element maps any EJB references to JNDI names and is discussed in "EJB Environment References".
The <resource-ref-mapping>
element maps any resource manager references to JNDI names and is discussed in "Resource Manager Connection Factory Environment References".
The <resource-env-ref-mapping>
element is used to map an administered object for a resource. For example, to use JMS, the bean must obtain both a JMS factory object and a destination object. These objects are retrieved at the same time from JNDI. The <resource-ref>
element declares the JMS factory and the <resource-env-ref>
element is used to declare the destination. Thus, the <resource-env-ref-mapping>
element maps the destination object. See "Configuring an Environment Reference to a JMS Destination or Connection Resource Manager Connection Factory (JMS 1.0)" for more information.
The <message-destination-ref-mapping>
element is only used if you are using JMS 1.1. Use this element to map the message-destination-ref-name
in the client deployment descriptor to another location that is available in the OC4J environment. It provides means of linking message consumers and producers to one or more common logical destinations. For more information, see "Configuring an Environment Reference to a JMS Destination Resource Manager Connection Factory (JMS 1.1)".
The <config-property>
element is only used if you are using a J2CA message service provider. Use this element to set J2CA resource adapter configuration properties. When OC4J deploys an MDB configured to use a J2CA message service provider, OC4J provides the MDB's activation specification to the resource adapter. This specification includes the properties you set in the <config-property>
element.
Alternatively, for an EJB 3.0 message-driven bean, you can set J2CA resource adapter configuration properties using @MessageDriven
attribute configProperty
and @ActivationConfig
annotation.
You can use the orion-ejb-jar.xml
file <config-property>
configuration to override @MessageDriven
configuration.
For more information, see the following: