Skip to main content

Specifying configuration data

Using the jms:destination elements you can configure your service's endpoint. You can specify the service endpoint's behaviors using the jms:runtimePolicy element that has a the following attributes:

Attribute

Description

useMessageIDAsCorrelationID

Specifies whether the JMS broker will use the message ID to correlate messages. The default is false .

durableSubscriberName

Specifies the name used to register a durable subscription.

messageSelector

Specifies the string value of a message selector to use. For more information on the syntax used to specify message selectors, see the JMS 1.1 specification.

transactional

Specifies whether the local JMS broker will create transactions around message processing. The default is false .

The following example shows a CXF configuration entry for configuring a JMS service endpoint.

Configuration for a JMS Service Endpoint

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:ct="http://cxf.apache.org/configuration/types"
   xmlns:jms="http://cxf.apache.org/transports/jms"
   xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans.xsd"
      http://cxf.apache.org/jaxws 
      http://cxf.apache.org/schemas/jaxws.xsd
      http://cxf.apache.org/transports/jms 
      http://cxf.apache.org/schemas/configuration/jms.xsd">
...
   <jms:destination 
      name="{http://cxf.apache.org/jms_endpt}HelloJMSPort.jms-destination">
      <jms:address ... >
         ...
      </jms:address>
         ...
      <jms:runtimePolicy messageSelector="cxf_message_selector"
         useMessageIDAsCorrelationID="true"
         transactional="true"
         durableSubscriberName="cxf_subscriber" />
      ...
   </jms:destination>
...
</beans>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!