JMS endpoints are configured using Spring configuration. You can configure the server-side and consumer-side transports independently.
The JMS address information is provided using the jms:address
element and its child, the jms:JMSNamingProperties element. The
jms:address element’s attributes specify the information needed to
identify the JMS broker and the destination. The
jms:JMSNamingProperties element specifies the Java properties
used to connect to the JNDI service.
You configure a JMS endpoint using one of the following configuration elements:
jms:conduitThe
jms:conduitelement contains the configuration for a consumer endpoint. It has one attribute,name, whose value takes the form{.WSDLNamespace}WSDLPortName.jms-conduitjms:destinationThe
jms:destinationelement contains the configuration for a provider endpoint. It has one attribute,name, whose value takes the form{.WSDLNamespace}WSDLPortName.jms-destination
JMS connection information is specified by adding a jms:address
child to the base configuration element. The jms:address element
uses the attributes described in Table 10.2 to configure
the connection to the JMS broker.
To increase interoperability with JMS and JNDI providers, the jms:address element has a child element, jms:JMSNamingProperties, that allows you to specify the values used to populate the properties used when connecting to the JNDI provider. The jms:JMSNamingProperties element has two attributes: name and value. name specifies the name of the property to set. value attribute specifies the value for the specified property. jms:JMSNamingProperties element can also be used for specification of provider specific properties.
The following is a list of common JNDI properties that can be set:
java.naming.factory.initialjava.naming.provider.urljava.naming.factory.objectjava.naming.factory.statejava.naming.factory.url.pkgsjava.naming.dns.urljava.naming.authoritativejava.naming.batchsizejava.naming.referraljava.naming.security.protocoljava.naming.security.authenticationjava.naming.security.principaljava.naming.security.credentialsjava.naming.languagejava.naming.applet
For more details on what information to use in these attributes, check your JNDI provider’s documentation and consult the Java API reference material.
Example C.2 shows a Fuse Services Framework configuration entry for configuring the addressing information for a JMS consumer endpoint.
Example C.2. Addressing Information in a Fuse Services Framework 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 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:conduit name="{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>








