12 JMS Resource Adapter Deployment Descriptor Elements and Properties

The Java Connector Architecture compliant deployment descriptor for the JMS resource adapter is named ra.xml. This file is used to integrate a WebLogic JMS client with supported foreign application servers.

The following topics provide information about the WebLogic JMS resource adapter deployment descriptor file, ra.xml:

Example JMS Resource Adapter ra.xml File

The following is an example ra.xml deployment descriptor file:

<?xml version="1.0" encoding="UTF-8"?>

<connector xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                               http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"  
           version="1.5">

   <display-name>Oracle JMS Connector</display-name>
   <vendor-name>Oracle Corporation</vendor-name>
   <eis-type>JMS</eis-type>
   <resourceadapter-version>2.0</resourceadapter-version>

   <resourceadapter>
      <resourceadapter-class>weblogic.jms.ra.ResourceAdapterImpl</resourceadapter-class>
      <config-property>
         <config-property-name>resourceProviderDefinitions</config-property-name>
         <config-property-type>java.lang.String</config-property-type>
         <config-property-value></config-property-value>
      </config-property>
      <config-property>
         <config-property-name>groupDefinitions</config-property-name>
         <config-property-type>java.lang.String</config-property-type>
         <config-property-value>
            (:)
         </config-property-value>
      </config-property>

   <outbound-resourceadapter>

   <!-- *************  WebLogic JMS Connection Factories  ************* -->

      <!--  WebLogic JMS non-XA javax.jms.ConnectionFactory  -->
      <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLConnection
         </connection-impl-class>
      </connection-definition>

      <!--  WebLogic JMS non-XA javax.jms.QueueConnectionFactory  -->

      <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedQueueConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLQueueConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLQueueConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLQueueConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLQueueConnection
         </connection-impl-class>
      </connection-definition>

      <!--  WebLogic JMS non-XA javax.jms.TopicConnectionFactory  -->

      <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedTopicConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLTopicConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLTopicConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLTopicConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLTopicConnection
         </connection-impl-class>
      </connection-definition>

      <!--  WebLogic JMS XA javax.jms.ConnectionFactory  -->

      <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedXAConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLXAConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLXAConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLXAConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLXAConnection
         </connection-impl-class>
      </connection-definition>

      <!--  WebLogic JMS XA javax.jms.QueueConnectionFactory  -->

       <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedXAQueueConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLXAQueueConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLXAQueueConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLXAQueueConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLXAQueueConnection
         </connection-impl-class>
      </connection-definition>

      <!--  WebLogic JMS XA javax.jms.TopicConnectionFactory  -->

      <connection-definition>
         <managedconnectionfactory-class>
            weblogic.jms.ra.WLManagedXATopicConnectionFactory
         </managedconnectionfactory-class>
         <connectionfactory-interface>
            weblogic.jms.ra.WLXATopicConnectionFactoryInterface
         </connectionfactory-interface>
         <connectionfactory-impl-class>
            weblogic.jms.ra.WLXATopicConnectionFactory
         </connectionfactory-impl-class>
         <connection-interface>
            weblogic.jms.ra.WLXATopicConnectionInterface
         </connection-interface>
         <connection-impl-class>
            weblogic.jms.ra.WLXATopicConnection
         </connection-impl-class>
      </connection-definition>

      <!-- ******************  miscellaneous outbound   ****************** -->

      <transaction-support>XATransaction</transaction-support>

      <authentication-mechanism>
         <authentication-mechanism-type>
            BasicPassword
         </authentication-mechanism-type>
         <credential-interface>
            javax.resource.spi.security.PasswordCredential
         </credential-interface>
      </authentication-mechanism>
      <reauthentication-support>false</reauthentication-support>

      </outbound-resourceadapter>

      <inbound-resourceadapter>
         <messageadapter>
            <messagelistener>
               <messagelistener-type>
                  javax.jms.MessageListener
               </messagelistener-type>
               <activationspec>
                  <activationspec-class>
                     weblogic.jms.ra.ActivationSpecImpl
                  </activationspec-class>
                  <required-config-property>
                     <config-property-name>ConnectionFactory</config-property-name>
                  </required-config-property>
                  <required-config-property>
                     <config-property-name>Destination</config-property-name>
                  </required-config-property>
                  <required-config-property>
                     <config-property-name>DestinationType</config-property-name>
                  </required-config-property>
               </activationspec>
            </messagelistener>
         </messageadapter>

      </inbound-resourceadapter>

      <!-- ******************  WebLogic JMS Destinations  ****************** -->

      <!-- WebLogic JMS javax.jms.Queue, weblogic.jms.extensions.WLDestination -->
      <adminobject>
         <adminobject-interface>
            weblogic.jms.ra.WLQueueAdminInterface
         </adminobject-interface>
         <adminobject-class>
            weblogic.jms.ra.WLQueueAdmin
         </adminobject-class>
      </adminobject>

      <!-- WebLogic JMS javax.jms.Topic, weblogic.jms.extensions.WLDestination -->
      <adminobject>
         <adminobject-interface>
            weblogic.jms.ra.WLTopicAdminInterface
         </adminobject-interface>
         <adminobject-class>
            weblogic.jms.ra.WLTopicAdmin
         </adminobject-class>
      </adminobject>

      <!-- javax.naming.Context for looking up weblogic.jms.extensions.WLDestination -->

      <adminobject>
         <adminobject-interface>
            weblogic.jms.ra.WLDestinationContextInterface
         </adminobject-interface>
        <adminobject-class>
            weblogic.jms.ra.WLDestinationContext
         </adminobject-class>
      </adminobject>

   </resourceadapter>
 
</connector>

JMS Resource Adapter Element Descriptions

activationspec

The <activationspec> child element of the <messagelistener> element is used to specify an activation specification. The information includes fully qualified Java class name of an activation specification and a set of required configuration property names.

activationspec-class

The <activationspec-class> child element of the <activationspec> element is used to specify the fully qualified Java class name of the activation specification class. This class must implement the javax.resource.spi.ActivationSpec interface. The implementation of this class is required to be a JavaBean.

adminobject

The <adminobject> child element of the <resourceadapter> element is used to specify information about an administered object. Administered objects are specific to a messaging style or message provider. This contains information on the Java type of the interface implemented by an administered object, its Java class name, and its configuration properties.

adminobject-class

The <adminobject-class> child element of the <adminobject> element is used to specify the fully qualified name of the Java type of the interface implemented by an administered object.

adminobject-interface

The <adminobject-interface> child element of the <adminobject> element is used to specify the fully qualified name of the Java type of the interface implemented by an administered object.

authentication-mechanism

The <authentication-mechanism> child element of the <outbound-resourceadapter> element specifies an authentication mechanism supported by the resource adapter.

The BasicPassword mechanism type should support the javax.resource.spi.security.PasswordCredential interface. The Kerbv5 mechanism type should support the org.ietf.jgss.GSSCredential interface or the deprecated javax.resource.spi.security.GenericCredential interface.

authentication-mechanism-type

The <authentication-mechanism-type> child element of the <authentication-mechanism> element specifies the authentication mechanism. Values are:

  • BasicPassword

  • Kerbv5

config-property-name

The <config-property-name> child element of the <config-property> or <required-config-property> element defines the name of a configuration property and is entered as a string. Valid names are specific to a resource adapter or administered object.

config-property-type

The <config-property-type> child element of the <config-property> element defines the data type of a configuration property value and is entered as a java.lang.String.

config-property-value

The <config-property-value> child element of the <config-property> element defines the value of a configuration property and is entered as a string.

connection-definition

The <connection-definition> child element of the <outbound-resourceadapter> element defines the classes and interfaces required by the Java Connector Architecture specification to define connection factories.

connectionfactory-impl-class

The <connectionfactory-imlp-class> child element of the <connection-definition> element defines the fully qualified name of the ConnectionFactory class that implements resource adapter specific ConnectionFactory interface. See http://java.sun.com/xml/ns/javaee/connector_1_6.xsd for more information.

config-property

The <config-property> child element of the <resourceadapter> element, <adminobject> element, and <connection-definition> element that defines a conversation property for a resource adapter administered objects. A configuration property is defined in the same manner as it is defined in the standard connector deployment descriptor.

connectionfactory-interface

The <connectionfactory-interface> child element of the <connection-definition> element specifies the fully qualified name of the ConnectionFactory interface supported by the resource adapter. See http://java.sun.com/xml/ns/javaee/connector_1_6.xsd for more information.

connection-impl-class

The <connection-imlp-class> child element of the <connection-definition> element specifies the fully qualified name of the connection class that implements resource adapter specific connection interface. See http://java.sun.com/xml/ns/javaee/connector_1_6.xsd for more information.

connection-interface

The <connection-interface> child element of the <connection-definition> element specifies the fully qualified name of the connection interface supported by the resource adapter.

connector

The <connector> element is the root element of the WebLogic JMS resource adapter deployment descriptor file, ra.xml

credential-interface

The <authentication-mechanism> child element of the <outbound-resourceadapter> element specifies the interface that the resource adapter implementation supports for the representation of the credentials.Values are:

  • javax.resource.spi.security.PasswordCredential

  • org.ietf.jgss.GSSCredential

  • javax.resource.spi.security.GenericCredential

display-name

The <display-name> element is an optional element that specifies the JMS resource adapter display name, a short name that can be displayed by GUI tools.

eis-type

The <eis-type> element specifies the Enterprise Information System (EIS) resource as JMS for this deployment descriptor file.

inbound-resourceadapter

The <inbound-resourceadapter> child element of the <resourceadapter> element is used to specify information about an inbound resource adapter. This contains information specific to the implementation of the resource adapter library as specified through the <messageadapter> element.

managedconnectionfactory-class

The <managedconnectionfactory-class> child element of the <connection-definition> specifies the fully qualified name of the Java class that implements the javax.resource.spi.ManagedConnectionFactory interface. This Java class is provided as part of resource adapter's implementation of connector architecture specified contracts. The implementation of this class is required to be a JavaBean. See http://java.sun.com/xml/ns/javaee/connector_1_6.xsd for more information.

messageadapter

The <messageadapter> child element of the <inbound-resourceadapter> element is used to specify messaging capabilities of the resource adapter. This contains information specific to the implementation of the resource adapter library as specified through the <messagelistener> element.

messagelistener

The <messagelistener> child element of the <messageadapter> element is used to specify the implementation of the message listener as specified through the <messagelistener-type> element.

messagelistener-type

The <messagelistener-type> child element of the <messageadapter> element is used to specify the specific message listener supported by the messaging resource adapter. It contains information on the Java type of the message listener interface and an activation specification.

reauthentication-support

The <reauthentication-support> child element of the <outbound-resourceadapter> element specifies whether the resource adapter implementation supports re-authentication of existing managed connection instances. Vaues are true or false.

required-config-property

The <required-config-property> child element of the <activationspec> element is used to specify required properties.

resourceadapter

The <resourceadapter> element encompasses the configuration of a single resource adapter that is deployed to a foreign JMS provider.

resourceadapter-class

The <resourceadapter-class> child element of the <resourceadapter> element specifies the JMS resource adapter implementation class.

resourceadapter-version

The <resourceadapter-version> element specifies the release version number for this deployment descriptor file.

outbound-resourceadapter

The <outbound-resourceadapter> child element of the <resourceadapter> element defines the configuration that is used to connect to an Enterprise Information System (EIS) from a foreign application server. The configuration defines connection factories for the resource adapter.

transaction-support

The <transaction-support> child element of the <outbound-resourceadapter> element specifies the level of transaction support provided by the resource adapter. The value must be one of the following:

  • NoTransaction

  • LocalTransaction

  • XATransaction

vendor-name

The optional vendor-name element specifies the JMS resource adapter vendor, Oracle Corporation, that can be displayed by GUI tools.

JMS Resource Adapter Inbound Properties

The following table provides information on additional properties used to configure the MDBs that consume inbound messages.


Property Value Description

acknowledgeMode

String

Set to Auto-acknowledge or Dups-ok-acknowledge. This controls the quality-of-service (QoS) provided by listener threads which consume messages and call the MDB's onMessage method.

Note: This release of the JMS resource adapter ignores this property. A QoS at least as strong as Auto-acknowledge is always used. Future versions may honor requests for Dups-ok-acknowledge.

Default is Auto-acknowledge.

clientId

String

A string value used to identify a JMS client. If set, the connection(s) used by the listener threads are set to use this value.

A clientId is required for applications interoperating with WebLogic Server JMS topics.

connectionFactory

String

The JNDI name of the connection factory.

The JMS resource adapter uses this connection factory to create the JMS connection it uses to receive messages for an MDB's onMessage. If the exception queue is enabled, the JMS Connector also uses a connection created from this connection factory for the production of messages to the exception queue.

See the description of the useExceptionQueue property, in this table, for more information.

If the onMessage method is configured to be XA transacted, then the connection factory specified by this property must XA-backed.

You must supply a connectionFactory, it cannot be a null value.

destination

String

The JNDI name of the destination.

The JMS resource adapter receives messages from this destination and passes the received messages to this MDB's onMessage.

You must supply a destination, it cannot be a null value.

destinationType

JMStype

One of the following: javax.jms.Topic, javax.jms.Queue, javax.jms.Destination.

You must supply a destinationType, it cannot be a null value.

exceptionQueue

String

The JNDI location of the jjavax.jms.Queue used as the exception queue.

See Using an Exception Queue for more information.

Required when UseExceptionQueue is true, and ignored when UseExceptionQueue is false.

FailureRetryInterval

long

The amount of time, in milliseconds, an application server waits to for a WorkManager to allocate a listener thread for an endpoint.

Default is 60,000 milliseconds.

includeBodiesInExceptionQueue

boolean

When true, messages sent to the exception queue include the message body. If many messages are sent to the exception queue during normal operation and the message body has no use in the exception queue, you can set the value to false to improve performance. This property is ignored when using an Exception Queue is false.

See Using an Exception Queue for more information.

There are two cases where this property does not apply:

  • If the original message did not have a message body, then the message sent to the exception queue will not have a message body.

  • If a copy of the original message can not be created for any reason, then the original may be sent to the exception queue instead. This may result in a message body being sent to the exception queue.

Default value is true.

listenerThreadMaxIdleDuration

long

The amount of time, in milliseconds, a listener thread which is not receiving any messages is kept available before being returned to the pool.

As long as an endpoint is active, idle threads are not dropped if the result it causes the number of available threads to be less than the value of minListenerThreads.

See minListenerThreads for more information.

Default value is 300,000.

loggerName

String

The name used to obtain a logger for this endpoint (see java.util.logging.Logger.getLogger).

logLevel

Level

Each log message has an associated severity level. The level gives a rough guide to the importance and urgency of a log message. Supported values are:

  • ConnectionPool

  • ConnectionOps

  • TransactionalOps

  • ListenerThreads

  • INFO

  • CONFIG

  • FINE

  • FINER

  • FINEST

  • SEVERE

  • WARNING

  • OFF

maxDeliveryCount

int

If a message has a JMSXDeliveryCount value greater than the value of MaxDeliveryCnt, the message is discarded.

If an exception queue is enabled, a copy of the message is sent to the exception queue. If the value of MaxDeliveryCnt is 0, no messages are discarded.

See the description of the useExceptionQueue property, in this table, for more information.

Note: When an MDB responds to a message by throwing an exception, the message is not considered delivered and it may be redelivered. If an MDB always respond to a given message by throwing an exception, and MaxDeliveryCnt is 0 to prevent messages from ever being discarded, the result may be an MDB stuck in an infinite loop that continuously fails to process the same message.

Default value is 5.

maxListenerThreads

int

The maximum number of listener threads created for an endpoint.

  • For queues: Using more than one thread may be useful in increasing the rate at which messages are consumed.

  • For topics: This value should always be 1.Each listener thread gets its own session and TopicSubscriber.

  • For durable subscribers: This value can be greater than 1 if multiple topic subscribers use the same subscription name simultaneously and from multiple connections.

  • For nondurable subscribers: Use one thread. Creating more threads creates more subscribers which translates into more copies of each message to process.

Default value is 1.

maxTotalListenerThreads

int

The additional number of listener threads created for an endpoint.

The JMS resource adapter implements a fairness policy for allocating threads whereby any destination which is below and needs more threads can reallocate threads from any other endpoint which has at least 2 more threads that it does.

See maxListenerThreads for more information.

This fairness policy continues functioning even if the application server's WorkManager does not grant the JMS resource adapter's requests for additional maxTotalListenerThreads new threads.

Default value is 1000.

messageSelector

String

A selector expression used to filter messages sent to the MDB's onMessage method. It is used filter messages for the JMS sessions created for the listener threads.

Default value is null, no message filtering.

minListenerThreads

int

The minimum number of listener threads created for this endpoint.

Valid values are range from 1 to maxListenerThreads.

See maxListenerThreads for more information.

If the application server allows the creation of 1 or more listener threads, but does not create that number of threads specified by MinListenerThreads, the endpoint activation does not fail and uses the available number of listener threads.

Default value is 1.

noLocal

boolean

If true, messages are not published locally.

In some cases, a connection may both publish and subscribe to a topic. The subscriber noLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection.

Default value is false.

password

String

The password of the resource provider.

See Setting User Name and Password Properties for more information

Default value is null.

providerProperties

String

A list of additional vendor specific properties defined as name/value pairs separated by a comma (",").

For example:

my_property_name=my_property_value,another_property_name=another_property_value

See WLConnection in Java API Reference for Oracle WebLogic Server.

receiveTimeout

long

The amount of time, in milliseconds, the JMS resource adapter waits for a message to arrive before exiting the current transaction.

The transaction manager limits the amount of time a transaction lasts. Set this value such that such that the transaction manager does timeout a transaction during onMessage unless there is a problem with the transaction. For example: If the transaction manager timeout is set to 30 seconds, and the onMessage routine never takes more than 10 seconds unless there is a problem with the transaction, then set this value to 200,000 (20 seconds).

Default value is 15,000.

subscriptionDurability

boolean

When Durable, specifies a subscription receives messages sent while a subscriber is not active.

Valid values are Durable or NonDurable.

Requires DestinationType of javax.jms.Topic or javax.jms.Destination) and a non-null subscriptionName property.

See the description of the useExceptionQueue property, in this table, for more information.

Default value is NonDurable.

subscriptionName

String

The reference name mapped to a subscriber when creating a durable subscriber for the listener thread.

This property is required when the value of the subscriptionDurability property is Durable and DestinationType is javax.jms.Topic or javax.jms.Destination. Ignored in all other cases.

For a given JMS server, a subscription name is assigned to at most one MDB which must have at most one listener thread.

useExceptionQueue

boolean

When true, messages that would otherwise be discarded are sent to the exception queue. Messages are normally sent to an exception queue when the maxDeliveryCount value is exceeded. Requires a valid exceptionQueue name.

See maxDeliveryCount for more information.

userName

String

The user name of the resource provider.

See Setting User Name and Password Properties for more information.

Default value is null.


JMS Resource Adapter Outbound Configuration Properties

Each JMS Connection Factory interface has its own <connection-definition> element. The <connection-definition> defines classes and interfaces as required by the Java Connector Architecture specification and it defines resource adapter configuration properties. The configuration properties can be set in the ra.xml file or set using the configuration tools provided by the Java EE container where this resource adapter is deployed.

The following table lists the outbound configuration properties that are supported:


Property Value Description

group

String

The name of the group to associate with this connection definition.

See Configuring JMS Resource Adapter Connection Factory Properties for more information.

rpResourceLocation

String

Provides information to the resource adapter describing how to look up the JMS connection factory associated with the <connection-definition> element. Typically the form is: connector:connectorName/remote-jndi-name.

The macros defined in a groupDefinition may be used as values in this field.

See Configuring JMS Resource Adapter Connection Factory Properties for more information.

autoCloseSession

boolean

When true, the JMS resource adapter attempts to close sessions when closing connections.

This is a workaround for some foreign JMS providers that do not close XA connections when a session is open.

providerCustomization

String

Specifies the JMS-provider-specific custom code. The value is a fully qualified class name.

Provider custom code may customize anything for which the JMS resource adapter customization API provides a hook, which may include inbound, outbound and recovery scenarios. The ProviderCustomization property need not be set if the JMS provider's connection factories implement the public String getOracleJMSRAProviderCustomization() method. If both are specified, the ProviderCustomization property (if not set to a null or blank value) takes precedence over the getOracleJMSRAProviderCustomization() method.

clientId

String

Optional.

All connections created from this connection-definition have the JMS clientID set to the setClientId value.

This should be used only when no clientId has been preconfigured for the connection factory in the WebLogic Server instance.


Administered Object Configuration Properties

The following administered object configuration properties are supported:


Property Value Description

group

String

The name of the group to associate with this connection definition.

See Configuring Destinations and Naming Contexts for more information.

rpResourceLocation

String

Provides information to the resource adapter describing how to look up the JMS connection factory associated with the <connection-definition> element. Typically the form is: connector:connectorName/remote-jndi-name. connectorName must be defined in the resourceProviderDefinitions.

See Basic Resource Provider Configuration for more information.

The macros defined in a groupDefinition may be used as values in this field.

See Configuring Destinations and Naming Contexts for more information.

rpContextLocation

String

Provides information to the resource adapter describing how how to lookup the destination context that is used to locate the Queue or Topic in a WebLogic Server instance. Typically the form is: connector:connectorName/. connectorName must be defined in the resourceProviderDefinitions.

See Basic Resource Provider Configuration for more information.