Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 68020 invoked from network); 22 Sep 2010 17:43:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Sep 2010 17:43:05 -0000 Received: (qmail 46646 invoked by uid 500); 22 Sep 2010 17:43:05 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 46567 invoked by uid 500); 22 Sep 2010 17:43:04 -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 46559 invoked by uid 99); 22 Sep 2010 17:43:04 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 17:43:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=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, 22 Sep 2010 17:42:42 +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 40CB6B38004 for ; Wed, 22 Sep 2010 17:42:22 +0000 (UTC) Message-ID: <4C9A3FFD.3050400@die-schneider.net> Date: Wed, 22 Sep 2010 19:42:21 +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: <4C906DA6.8020500@die-schneider.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Jeff, that is interesting. Do you have any idea why this is happening? If it is a common problem with jndi connectionfactories we could document it in the wiki. Would you mind posting your working config. I will try to make some documentation or an example from it. Best regards Christian Am 22.09.2010 17:33, schrieb Jeffrey Knight: > Thanks for the help on this. The missing piece to get CXF to work with > MQ configured as a JNDI resource in WebSphere was : > > > > Without this settings, connections are dropped as soon as they're established. > > -Jeff > > On Wed, Sep 15, 2010 at 2:54 AM, Christian Schneider > wrote: >> 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.apache.cxf.transport.jms.JMSConfiguration"> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> class="org.springframework.jms.connection.SingleConnectionFactory"> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> class="org.apache.cxf.transport.jms.JNDIConfiguration"> >>> >>> >>> >> >>> 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.apache.cxf.transport.jms.JMSConfiguration"> >>> >>> >>> >>> >>> >>> >>> >>> >> class="org.springframework.jms.connection.SingleConnectionFactory"> >>> >>> >>> >>> >>> >>> >>> >>> -Jeff >>> >> -- >> ---- -- ---- http://www.liquid-reality.de