Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can specify the message type supported by the consumer endpoint using a jms:clientruntimePolicy element that has a single attribute:

...

Code Block
titleConfiguration for a JMS Consumer 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">
...
<jms:conduit id="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-conduit">
  <jms:clientaddress ... >
    ...
  </jms:address>
  <jms:runtimePolicy messageType="binary"/>
...
</jms:conduit>
...
</beans>

...

Specifying configuration data

Using the jms:destination element elements you can configure your service's endpoint to use JMS. You can specify the service endpoint's behaviors using the server property. It has a single element, jms:server, runtimePolicy element that has a the following attributes:

...

Code Block
titleConfiguration 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">
...
<jms:destination id="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-destination">
  <jms:server messageSelector="cxf_message_selector"
 address ... >
    ...
  </jms:address>
  ...
  <jms:runtimePolicy messageSelector="cxf_message_selector"
                     useMessageIDAsCorrelationID="true"
                     transactional="true"
                   durableSubscriberName="cxf_subscriber" />
</bean>
...
</beans>

Adding address information

The jms:address described above can also be embedded in the jms:destination:

Code Block
titleConfiguration for a JMS Service Endpoint

<jms:destination id="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-destination" durableSubscriberName="cxf_subscriber" />
  <jms:address ...
</>
  <jms:server jms:destination>
.../>
</bean>beans>

Using WSDL

Service endpoint behaviors are configured using the optional jms:server element. The jms:server element is a child of the WSDL port element and has the following attributes:

...

You configure an endpoint's JMS session pool using the jms:sessionPoolConfig property element. This property allows you to set a high and low water mark for the number of JMS sessions an endpoint will keep pooled. The endpoint is guaranteed to maintain a pool of sessions equal to the low water mark and to never pool more sessions than specified by the high water mark.
The sessionPool property takes a single jms:sessionPool element. The jms:sessionPool element's attributes, listed below, specify the high and low water marks for the endpoint's JMS session pool.

...

  • the number of milliseconds the consumer will wait for a response.
  • the number of milliseconds a request will exist before the JMS broker can remove it.

You use the clientConfig property to set JMS consumer runtime behavior. This property has a single element called jms-conf:clientConfigthe jms:clientConfig element to set JMS consumer runtime behavior. This element's attributes, listed in the following table, specify the configuration values for consumer runtime behavior.

...

Code Block
titleJMS Consumer Endpoint Runtime Configuration
<jms:conduit id="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-conduit">
...
  <jms:runtimePolicyclientConfig clientReceiveTimeout="500"
                          messageTimeToLive="500" />
</jms:conduit>

...

  • the amount of time a response message can remain unreceived be fore the JMS broker can delete it.
  • the client identifier used when creating and accessing durable subscriptions.

The jms:serverConfig property element is used to specify the service runtime configuration. It takes a single jms-conf:serverConfig element. This element's attributes, listed below, specify the configuration values that control the service's runtime behavior.

...

Code Block
titleJMS Service Endpoint Runtime Configuration
<jms:destination id="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-destination">
  <jms:runtimePolicyaddress ... >
    ...
  </jms:address>
  <jms:serverConfig messageTimeToLive="500"
                      durableSubscriptionClientId="jms-test-id" />
</jms:destination>