Skip to main content

Summary How to configure a JMS connection factory in Artix 5.5 JAX-WS using  the JMSConfigFeature?
Article Number 18710
Environment Artix 5.5 Java (JAX-WS)
All Supported Operating Systems
Question/Problem Description How to configure a JMS connection factory in Artix 5.5 JAX-WS using  the JMSConfigFeature?
How to configure an ActiveMQ connection factory in Artix 5.5 JAX-WS using the JMSConfigFeature?
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution

It is possible to retrieve a JMS connection Factory from JNDI or configuring the JMS connection directly using then JMSConfigFeature. The xml snippet below shows a sample configuration using the JMSConfigFeature. This snippet can be used with the demo located in <ARTIX_JAVA_HOME>\\samples\\transports\\jms\\soap_over_jms.

... 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxws="
http://cxf.apache.org/jaxws"
 xmlns:p="
http://www.springframework.org/schema/p"
    xsi:schemaLocation="
       
http://cxf.apache.org/jaxws
       
http://cxf.apache.org/schemas/jaxws.xsd
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd"

...

<jaxws:client name="{http://apache.org/hello_world_soap_http}HelloWorldActiveMQPort"
  serviceClass="org.apache.hello_world_soap_http.Greeter"
  address="jms://"
  createdFromAPI="true">
  <jaxws:features>
   <bean xmlns="
http://www.springframework.org/schema/beans"
    class="org.apache.cxf.transport.jms.JMSConfigFeature"
    p:jmsConfig-ref="jmsConfig"/>
  </jaxws:features>
    </jaxws:client>
 
 <bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration"
  p:connectionFactory-ref="jmsConnectionFactory"
  p:targetDestination="test.jmstransport.text"/>
 
  <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
  <property name="targetConnectionFactory">
   <bean class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616" />
   </bean>
  </property>
 </bean>

...

Information on configuring Artix to retrieve a JMS connection factory through JMS can be found in the Artix Guide "Artix Bindings and Transports, Java Runtime" .

 

Workaround
Notes
Attachment

Created date: 06 September 2011
Last Modified: 13 February 2013
Last Published: 23 June 2012
First Published date: 10 September 2011

#KnowledgeDocs
#Orbix