Configuring JMS connection factories

You can configure JMS connection factories that are provided by resource adapters that comply with the Java™ EE Connector Architecture (JCA) specification.

About this task

You can configure one or more JMS connection factory instances for JMS connection factory types that are provided by an installed resource adapter.
Configuration elements are provided for the following types of JMS connection factories:
  • javax.jms.ConnectionFactory: jmsConnectionFactory
  • javax.jms.QueueConnectionFactory: jmsQueueConnectionFactory
  • javax.jms.TopicConnectionFactory: jmsTopicConnectionFactory
Note:

To add JCA support for Liberty, you must edit the server.xml file using either the Source view of the Server configuration editor of the WebSphere® Application Server Developer Tools for Eclipse, or some other text editor. Editing portions of the configuration for connection factories, administrative objects, activation specifications, and resource adapters in the Design view is not supported in the Beta.

Procedure

Configure one or more JMS connection factory instances.
When you configure the connection factory instances, you must supply a properties subelement, even if you do not want to override any configuration properties, to associate the jmsConnectionFactory, jmsQueueConnectionFactory, or jmsTopicConnectionFactory element with a connection factory interface that is provided by a particular resource adapter. The properties subelement always follows the pattern properties.<rar_identifier> for JMS connection factories.
In the following example, the MyAdapter resource adapter provides only one type of connection factory:
<jmsConnectionFactory jndiName="jms/cf" containerAuthDataRef="auth1">
 <properties.MyAdapter serverName="localhost" anotherProperty="40"/>
</jmsConnectionFactory>
<authData id="auth1" user="user1" password="{xor}Lz4sLCgwLTtu"/>

<jmsQueueConnectionFactory jndiName="jms/qcf"> 
 <connectionManager maxPoolSize="20" connectionTimeout="0"/> 
 <properties.MyAdapter serverName="localhost" vendorProp1="1"/> 
</jmsQueueConnectionFactory> 

<jmsTopicConnectionFactory jndiName="jms/tcf"> 
 <properties.MyAdapter serverName="localhost" prop1="A" prop2="B"/>  
</jmsTopicConnectionFactory>
Note: This topic assumes that a resource adapter with a unique identifier of MyAdapter has already been configured in the server and that the jms-1.1 feature has been enabled, see topic Configuring resource adapters for further details.

Limitation: Editing the properties of the resource adapter configuration for connection factories, administrative objects, activation specifications, and resource adapters in the Design view of WebSphere Development Tools (WDT) is not supported.