Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change the jms destination and conduit's name attribute from 'id' to 'name'

...

The basic configuration for a JMS endpoint is done by using a jms:address element as the child of your service's port element. The jms:address element uses the attributes described below to configure the connection to the JMS broker.

Anchor
addressTable
addressTable

...

  • jms:conduit: The jms:conduit element contains the configuration for a consumer endpoint. It has one attribute, id name, whose value takes the form
    No Format
    
    {WSDLNamespace}WSDLPortName.jms-conduit
    
    .
  • jms:destination: The jms:destination element contains the configuration for a provider endpoint. It has one attribute, id name, whose value takes the form
    No Format
    
    {WSDLNamespace}WSDLPortName.jms-destination
    
    .

The address element

JMS connection information is specified by adding a jms:address child to the base configuration element. The jms:address element used in the configuration file is identical to the one used in the WSDL file. Its attributes are listed in the address element's attribute table. Like the jms:address element in the WSDL file, the jms:address configuration element also has a jms:JMSNamingProperties child element that is used to specify additional information used to connect to a JNDI provider.

...

Code Block
titleAddressing Information a Configuration File
<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 idname="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-conduit">
  <jms:address destinationStyle="queue"
               jndiConnectionFactoryName="myConnectionFactory"
               jndiDestinationName="myDestination"
               jndiReplyDestinationName="myReplyDestination"
               connectionUserName="testUser"
               connectionPassword="testPassword">
    <jms:JMSNamingProperty name="java.naming.factory.initial"
                           value="org.apache.cxf.transport.jms.MyInitialContextFactory"/>
    <jms:JMSNamingProperty name="java.naming.provider.url"
                           value="tcp://localhost:61616"/>
  </jms:address>
</jms:conduit>
</beans>

...

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 idname="{http://cxf.apache.org/jms_endpt}HelloWorldJMSPort.jms-conduit">
  <jms:address ... >
    ...
  </jms:address>
  <jms:runtimePolicy messageType="binary"/>
...
</jms:conduit>
...
</beans>

...

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

...

Code Block
titleJMS Session Pool Configuration
<jms:destination idname="{http://cxf.apache.org/jms_endpit}HelloWorldJMSPort.jms-destination">
...
  <jms:sessionPool lowWaterMark="10" highWaterMark="5000" />
</jms:destination>

...

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

...