Configuring JMS destinations
You can configure JMS destinations that are provided by resource adapters that comply with the Java™ EE Connector Architecture (JCA) specification.
About this task
- javax.jms.Destination: jmsDestination
- javax.jms.Queue: jmsQueue
- javax.jms.Topic: jmsTopic
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
Example
Use the following example to learn how to configure resource adapters with two JMS destinations with unique implementation class names
In the following snippet from a ra.xml file the MyAdapter resource adapter provides two JMS destinations with unique implementation class names:
<adminobject>
<adminobject-interface>javax.jms.Destination</adminobject-interface>
<adminobject-class>com.vendor.adapter.QueueImpl</adminobject-class>
<config-property>
<config-property-name>queueName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
...
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Destination</adminobject-interface>
<adminobject-class>com.vendor.adapter.TopicImpl</adminobject-class>
<config-property>
<config-property-name>topicName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
...
</adminobject>
The following is an example of a server
configuration for this scenario:<jmsDestination jndiName="jms/destination1">
<properties.MyAdapter.QueueImpl queueName="D1"/>
</adminObject>
<jmsDestination jndiName="jms/destination2">
<properties.MyAdapter.TopicImpl topicName="D2"/>
</jmsDestination>
Use the following example to learn how to configure resource adapters with two administered objects without implementation class names that are unique.
In the following snippet from a ra.xml file the MyAdapter resource adapter provides two administered objects with non-unique implementation class names:
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>com.vendor.adapter.QueueImpl</adminobject-class>
<config-property>
<config-property-name>queueName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
...
</adminobject>
<adminobject>
<adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject-class>com.vendor.adapter.advanced.QueueImpl</adminobject-class>
<config-property>
<config-property-name>name</config-property-name>
<config-property-type>java.lang.String</config-property-type>
</config-property>
...
</adminobject>
The following is an example of a server
configuration for this scenario:<jmsQueue jndiName="jms/myQueue">
<properties.MyAdapter.com.vendor.adapter.QueueImpl queueName="Q1"/>
</jmsQueue>
<jmsQueue jndiName="jms/myAdvancedQueue">
<properties.MyAdapter.com.vendor.adapter.advanced.QueueImpl name="Q1"/>
</jmsQueue>
In some scenarios, lengthy
configuration element names might be undesirable. See the information
about customizing JCA configuration elements to learn how to override
the suffixes of configuration element names.