Versions Compared

Key

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

...

Query Parameter

From
Version

DefaultValue

Description

conduitIdSelectorPrefix3.0.0 If set then this string will be the prefix for all correlation ids the conduit creates and also be used in the selector for listening to replies

deliveryMode

 

PERSISTENT

NON_PERSISTENT messages will kept only in memory
PERSISTENT messages will be saved to disk

durableSubscriptionClientId3.0.1 Optional Client identifier for the connection. The purpose is to associate a connection with a state maintained on behalf of the client by a provider. The only such state identified by the JMS API is that required to support durable subscriptions.
durableSubscriptionName3.0.0  

jndiConnectionFactoryName

 

ConnectionFactory

Specifies the JNDI name bound to the JMS connection factory to use when connecting to the JMS destination.

jndiInitialContextFactory

 

 

Specifies the fully qualified Java class name of the "InitialContextFactory" implementation class to use.

jndiTransactionManagerName3.0.0 

Name of the JTA TransactionManager. Will be searched in spring, blueprint and jndi.
If a transaction manager is found then JTA transactions will be enabled. See details below.

jndiURL

 

 

Specifies the JNDI provider URL

jndi-*  Additional parameters for a JNDI provider
messageType3.0.0byteJMS message type used by CXF (byte, text or binary)
password3.0.0 Password for creating the connection. Using this in the URI is discouraged
priority3.0.04Priority for the messages. See your JMS provider documentation for details. Values range from 0 to 9 where 0 is lowest priority

replyToName

 

 

Specifies the JNDI name bound to the JMS destinations where replies are sent

receiveTimeout3.0.060000Timeout in milliseconds the client waits for a reply in case of request / repy exchanges
reconnectOnException

deprecated

in 3.0.0

trueShould the transport reconnect in case of exceptions. From version 3.0.0 on the transport will always reconnect in case of exceptions
sessionTransacted3.0.0falseSet to true for resource local transactions. Do not set if you use JTA

timeToLive

 

0

Time (in ms) after which the message will be discarded by the jms provider

topicReplyToName  Reply to messages on a topic with this name. Depending on the variant this is either  a jndi or jms name.
useConduitIdSelector3.0.0true

Each conduit is assigned with a UUID. If set to true this conduit id will be the prefix for all correlation ids. This allows several endpoints to

share a JMS queue or topic

username

3.0.0

 

Username for creating the connection

concurrentConsumers 1Number of consumers listening queue concurrently

Some of these attributes are specified in the JMS URI specification.

...

Code Block
languagexml
titleGreeter Service with JMS transaporttransport
<wsdl:definitions name="JMSGreeterService"  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  xmlns:tns="http://cxf.apache.org/jms_greeter" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:x1="http://cxf.apache.org/jms_greeter/types" 
  xmlns:soapjms="http://www.w3.org/2010/soapjms/" name="JMSGreeterService" 
  targetNamespace="http://cxf.apache.org/jms_greeter">
    ...
	<wsdl:binding name="JMSGreeterPortBinding" type="tns:JMSGreeterPortType">
		<soap:binding style="document" transport="http://www.w3.org/2010/soapjms/" />
		<soapjms:jndiContextParameter name="name" value="value" />
		<soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
		<soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
		<soapjms:jndiURL>tcp://localhost:61616</soapjms:jndiURL>
		<soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
		<soapjms:priority>5</soapjms:priority>
		<soapjms:timeToLive>1000</soapjms:timeToLive>
		<wsdl:operation name="greetMe">
			<soap:operation soapAction="test" style="document" />
			<wsdl:input name="greetMeRequest">
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output name="greetMeResponse">
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
        <wsdl:service name="JMSGreeterService">
		<soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
		<soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
		<wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
			<soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue" />
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>

...

NOTE: For tests it can be useful to create an embedded broker like this:

Code Block

    public final void run() {
        try {             
            broker = new BrokerService();
            broker.setPersistent(false);
            broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
            broker.setTmpDataDirectory(new File("./target"));
            broker.setUseJmx(false);
            if (brokerName != null) {
                broker.setBrokerName(brokerName);
            }
            broker.addConnector(brokerUrl1);
            broker.start();  
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

...