Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
borderStylesolid
<wsdl:definitions
    xmlns:jms="http://cxf.apache.org/transports/jms" 
...
  <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
        <soap:binding style="document" transport="http://cxf.apache.org/transports/jms"/>
...
 </wsdl:binding>

  <wsdl:service name="JMSGreeterService">
        <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
            <jms:address
                destinationStyle="queue"
                jndiConnectionFactoryName="ConnectionFactory" 
jndiDestinationName="dynamicQueues/test.cxf.jmstransport.queue">
               <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
                  <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61616"/>
           </jms:address>
        </wsdl:port>
   </wsdl:service>

CXF clients and servers implemented in java or using Spring configuration magically work for this WSDL (under the hood CXF selects correct JMS Conduit and Destination based on address URL).
Details are described in http://cxf.apache.org/docs/jms-transport.htmlImage Removed.
CXF also delivers jms_queue and jms_pubsub examples illustrating using JMS transport with default settings for ActiveMQ.

...

You can see that Spring provides solution for both mentioned scalability aspects. But how we can use it in CXF?

...

You can see that the endpoint configuration contains the JMSConfigFeature that has a JMSConfiguration property.
JMSConfiguration supports all settings that we have seen in Spring DefaultMessageListenerContainer: cached connection factory with session pool size, number of concurrent consumers, cache level. All settings of JMSConfiguration are described in details in http://cxf.apache.org/docs/using-the-jmsconfigfeature.htmlImage Removed.
Using this configuration the server application can be tuned to achieve optimal performance in our target environment.

...

It is possible to achieve scalability of a CXF client and service using Spring JMS functionality and the CXF JMS Configuration Feature.
It is not necessary to write any line of code, just configure and leverage already existing stuff.
Using this feature can have essential invluence on the performance for some environments: in one Prove Of Concept I have improved CXF service throughput on 360% (from 500 to 1800 msg/sec) just using session pool and multithread JMS consumer!
Reference performance numbers for SOAP over JMS are represented in Christian Schneider's article: http://www.liquid-reality.de/pages/viewpage.action?pageId=5865562Image Removed, so you can easily compare it with own results and make appropriate tunning if necessary.

...