Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 63596 invoked from network); 15 Sep 2010 06:55:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Sep 2010 06:55:05 -0000 Received: (qmail 84409 invoked by uid 500); 15 Sep 2010 06:55:04 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 84227 invoked by uid 500); 15 Sep 2010 06:55:02 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 84214 invoked by uid 99); 15 Sep 2010 06:55:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 06:55:01 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [62.75.158.78] (HELO mail.liquid-reality.de) (62.75.158.78) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 06:54:53 +0000 Received: from [10.0.0.101] (HSI-KBW-091-089-018-199.hsi2.kabelbw.de [91.89.18.199]) by mail.liquid-reality.de (Postfix) with ESMTP id F3AACB38004 for ; Wed, 15 Sep 2010 06:54:32 +0000 (UTC) Message-ID: <4C906DA6.8020500@die-schneider.net> Date: Wed, 15 Sep 2010 08:54:30 +0200 From: Christian Schneider User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: users@cxf.apache.org Subject: Re: Configuring CXF with JMS using a JNDI resource References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------000300090505080000060409" X-Virus-Checked: Checked by ClamAV on apache.org --------------000300090505080000060409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Jeff, sorry for replying so late. For the connection factory you should use a jndi lookup like described in the spring documentation: You will not need a Wrapper for the factory. To resolve the destinations via jndi you simply set the destinationResolver in the JmsConfiguration to a spring JndiDestinationResolver. So you can use jndi names for all destinations and spring will do the lookup. http://www.jarvana.com/jarvana/view/org/springframework/spring/1.2.9/spring-1.2.9-javadoc.jar!/org/springframework/jms/support/destination/JndiDestinationResolver.html You will not need the JNDIConfiguration from cxf. This is mainly used internally if you configure jms using the wsdl. I am not exactly sure how you define the Jndi config in spring but it should be described in the spring documentations. In any case by injecting the connectionFactory and destinationResolver like described above you should be able to use plain spring jms config stuff. I hope I could help you a little. I think we do not yet have a nice example for this. If you have more problems you can post your config and I will dig more into it. Best Regards Christian Am 14.09.2010 01:31, schrieb Jeffrey Knight: > Hello > > I've developed a CXF service that uses JMS transport. My configuration > [1] is all in the applicationContext.xml rather than WSDL or in the > code as part of the @WebService. > > Now, instead of targeting the JMS directly, I want to use a JNDI > resource defined in WebSphere. > I haven't been able to find any documentation on how to do this with > CXF (but I keep finding information on " " configurations which I believe have been superseded by the JMSConfigFeature). > > I'm expecting that I will NOT need the tcp://... broker url, since > that's already configured in the JNDI resource itself. > I should only need: > - JNDI name (as configured in WebSphere) > - targetDestination (the JNDI name of the target queue) > - replyDestination (then JNDI name of the target queue) > - username (optional) > - password (optional). > > But I'm confused about the "wrapped connection factory" and > org.apache.cxf.transport.jms.JNDIConfiguration pieces. > > Where does the JNDI configuration go, and what parameters do I need? > > xmlns:batch="urn://my.namespace.here" id="MyId" > address="jms://" transportId="http://cxf.apache.org/transports/jms" > serviceName="ns1:MyService" > endpointName="ns1:MyPort" > implementor="com.some.path.MyImpl" > wsdlLocation="jar:file:WEB-INF/lib/MyWebServiceContracts.jar!/some/path/My.wsdl"> > > > > > > > > > > > > > > > > > > > > > > class="org.springframework.jms.connection.SingleConnectionFactory"> > > > > > > > > > > > > key="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory > > > > > > > > > > > > [2] Current applicationContext.xml, targeting the message queue directly (works) > > xmlns:batch="urn://my.namespace.here" id="MyId" > address="jms://" transportId="http://cxf.apache.org/transports/jms" > serviceName="ns1:MyService" > endpointName="ns1:MyPort" > implementor="com.some.path.MyImpl" > wsdlLocation="jar:file:WEB-INF/lib/MyWebServiceContracts.jar!/some/path/My.wsdl"> > > > > > > > > > > > > > > > > class="org.springframework.jms.connection.SingleConnectionFactory"> > > > > > > > > -Jeff > -- ---- http://www.liquid-reality.de --------------000300090505080000060409--