Hi Christian ,

As I see the constructeur of 
org.objectweb.joram.client.jms.tcp.QueueTcpConnectionFactory, there are no 
parameters and it attemps only to create an empty QueueTcpConnectionFactory 
instance. 

(http://joram.ow2.org/current/javadoc/org/objectweb/joram/client/jms/tcp/QueueTcpConnectionFactory.html)

And in its methods, where we can put parameters to create a 
QueueTcpConnectionFactory .

Any suggestions ?

Thanks
 
=========================================================================
NGUYEN Tien Luong                    |                    M2PGI - UFRIMAG       
  
13 Rue Blanche MONIER                |               Tel : 06.45.42.46.33
38000 GRENOBLE                       |              http://tienluong.info




----- Original Message ----
From: Christian Schneider <[email protected]>
To: [email protected]
Sent: Fri, 7 May, 2010 8:01:25
Subject: Re: Using the JMS via Configuration

Your connectionfactory bean does not contain any configuration. When 
using the JmsConfiguration aproach then the contents of jmsconduit are 
not used (at least I think so).
So you have to use the normal spring style to configure the 
connectionfactory. The good thing is that you can either keep using jndi 
or create a connectionfactory in the bean.
The easisest way will probably be to simply use the following:

<bean id="connectionFactory" 
class="org.objectweb.joram.client.jms.tcp.QueueTcpConnectionFactory">
    <constructor-arg value="your joram host url"/>
</bean>

This could already solve the propblem.


Greetings

Christian



Am 07.05.2010 02:00, schrieb Nguyen Tien Luong:
> Hi Christian,
>
> In fact I have do somethings with my jms-conduit so I continue with this 
> aproche.
>
> Here my Spring bean and the WSDL, I just put all the JMS config part in 
> comment
>
> ______________________________________________
> <wsdl:definitions name="JMSGreeterService"
>      targetNamespace="http://cxf.apache.org/jms_greeter";
>      xmlns="http://schemas.xmlsoap.org/wsdl/";
>      xmlns:jms="http://cxf.apache.org/transports/jms";
>      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";>
>      <wsdl:types>
>          <schema
>              targetNamespace="http://cxf.apache.org/jms_greeter/types";
>              xmlns="http://www.w3.org/2001/XMLSchema";
>              elementFormDefault="qualified">
>              <element name="sayHi">
>                  <complexType />
>              </element>
>              <element name="sayHiResponse">
>                  <complexType>
>                      <sequence>
>                          <element name="responseType" type="xsd:string" />
>                      </sequence>
>                  </complexType>
>              </element>
>              <element name="greetMe">
>                  <complexType>
>                      <sequence>
>                          <element name="requestType" type="xsd:string" />
>                      </sequence>
>                  </complexType>
>              </element>
>              <element name="greetMeResponse">
>                  <complexType>
>                      <sequence>
>                          <element name="responseType" type="xsd:string" />
>                      </sequence>
>                  </complexType>
>              </element>
>              <element name="greetMeOneWay">
>                  <complexType>
>                      <sequence>
>                          <element name="requestType" type="xsd:string" />
>                      </sequence>
>                  </complexType>
>              </element>
>          </schema>
>      </wsdl:types>
>
>
>      <wsdl:message name="sayHiRequest">
>          <wsdl:part element="x1:sayHi" name="in" />
>      </wsdl:message>
>      <wsdl:message name="sayHiResponse">
>          <wsdl:part element="x1:sayHiResponse" name="out" />
>      </wsdl:message>
>      <wsdl:message name="greetMeRequest">
>          <wsdl:part element="x1:greetMe" name="in" />
>      </wsdl:message>
>      <wsdl:message name="greetMeResponse">
>          <wsdl:part element="x1:greetMeResponse" name="out" />
>      </wsdl:message>
>      <wsdl:message name="greetMeOneWayRequest">
>          <wsdl:part element="x1:greetMeOneWay" name="in" />
>      </wsdl:message>
>
>      <wsdl:portType name="JMSGreeterPortType">
>          <wsdl:operation name="sayHi">
>              <wsdl:input message="tns:sayHiRequest" name="sayHiRequest" />
>              <wsdl:output message="tns:sayHiResponse"
>                  name="sayHiResponse" />
>          </wsdl:operation>
>
>          <wsdl:operation name="greetMe">
>              <wsdl:input message="tns:greetMeRequest"
>                  name="greetMeRequest" />
>              <wsdl:output message="tns:greetMeResponse"
>                  name="greetMeResponse" />
>          </wsdl:operation>
>
>          <wsdl:operation name="greetMeOneWay">
>              <wsdl:input message="tns:greetMeOneWayRequest"
>                  name="greetMeOneWayRequest" />
>          </wsdl:operation>
>
>      </wsdl:portType>
>
>      <wsdl:binding name="JMSGreeterPortBinding"
>          type="tns:JMSGreeterPortType">
>          <soap:binding style="document"
>              transport="http://cxf.apache.org/transports/jms"; />
>
>          <wsdl:operation name="greetMe">
>              <soap:operation soapAction="" 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:operation name="sayHi">
>              <soap:operation soapAction="" style="document" />
>              <wsdl:input name="sayHiRequest">
>                  <soap:body use="literal" />
>              </wsdl:input>
>              <wsdl:output name="sayHiResponse">
>                  <soap:body use="literal" />
>              </wsdl:output>
>          </wsdl:operation>
>
>          <wsdl:operation name="greetMeOneWay">
>              <soap:operation soapaction="" style="document" />
>              <wsdl:input name="greetMeOneWayRequest">
>                  <soap:body use="literal" />
>              </wsdl:input>
>          </wsdl:operation>
>      </wsdl:binding>
>
>      <wsdl:service name="JMSGreeterService">
>            <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
>                <!--<jms:address
>                    destinationStyle="queue"
>                    jndiConnectionFactoryName="cf"
>                    jndiDestinationName="request"
>                    jndiReplyDestinationName="replyWSDL"
>                    >
>
>                    <jms:JMSNamingProperty name="java.naming.factory.initial" 
>value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>                    <jms:JMSNamingProperty name="java.naming.factory.host" 
>value="localhost"/>
>                    <jms:JMSNamingProperty name="java.naming.factory.port" 
>value="16400"/>
>
>                </jms:address>
>                <jms:runtimePolicy messageType="binary"/>
>                <jms:clientConfig useConduitIdSelector="false"/>  -->
>            </wsdl:port>
>      </wsdl:service>
>
> </wsdl:definitions>
> ______________________________________________
>
> Here my bean.xml
>
> ______________________________________________
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:tx="http://www.springframework.org/schema/tx";
>      xmlns:context="http://www.springframework.org/schema/context";
>      xmlns="http://www.springframework.org/schema/beans";
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>      xmlns:jms="http://cxf.apache.org/transports/jms";
>      xmlns:p="http://www.springframework.org/schema/p";
>      xmlns:util="http://www.springframework.org/schema/util";
>      xsi:schemaLocation="
>              http://www.springframework.org/schema/beans
>              http://www.springframework.org/schema/beans/spring-beans.xsd
>              http://www.springframework.org/schema/context
>              
>http://www.springframework.org/schema/context/spring-context-2.5.xsd
>              http://www.springframework.org/schema/tx
>              http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
>              http://cxf.apache.org/transports/jms
>              http://cxf.apache.org/schemas/configuration/jms.xsd";>
>
>      <context:component-scan base-package="demo.jms_greeter.client"/>
>
>      <!-- CXF Configuration  -->
>      <import resource="classpath:META-INF/cxf/cxf.xml" />
>      <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>      <import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
>
>      <jms:conduit 
>name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-conduit";>
>          <jms:clientConfig/>
>            <jms:runtimePolicy messageType="binary"/>
>            <jms:sessionPool lowWaterMark="10" highWaterMark="5000"/>
>            <jms:address destinationStyle="queue"
>                      jndiConnectionFactoryName="testConnectionFactory"
>                    jndiDestinationName="request"
>                    jndiReplyDestinationName="reply"
>                    >
>              <jms:JMSNamingProperty name="java.naming.factory.initial"
>                                    
>value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>              <jms:JMSNamingProperty name="java.naming.provider.host" 
>value="localhost"/>
>              <jms:JMSNamingProperty name="java.naming.provider.port" 
>value="16400"/>
>            </jms:address>
>      </jms:conduit>
>
>      <jms:destination 
>name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-destination";>
>          <jms:sessionPool lowWaterMark="10" highWaterMark="5000"/>
>            <jms:address destinationStyle="queue"
>                        jndiConnectionFactoryName="testConnectionFactory"
>                        jndiDestinationName="request"
>                        jndiReplyDestinationName="reply"
>                        >
>              <jms:JMSNamingProperty name="java.naming.factory.initial"
>                                    
>value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>              <jms:JMSNamingProperty name="java.naming.provider.host" 
>value="localhost"/>
>              <jms:JMSNamingProperty name="java.naming.provider.port" 
>value="16400"/>
>            </jms:address>
>      </jms:destination>
>
> </beans>
> ______________________________________________
>
> It works like a charm, and when I add the jmsConfig-ref in jms-conduit, the 
> problem raises
>
> ______________________________________________
> <jms:conduit 
> name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-conduit";>
>          <jms:clientConfig/>
>            <jms:runtimePolicy messageType="binary"/>
>            <jms:sessionPool lowWaterMark="10" highWaterMark="5000"/>
>            <jms:address destinationStyle="queue"
>                      jndiConnectionFactoryName="testConnectionFactory"
>                    jndiDestinationName="request"
>                    jndiReplyDestinationName="reply"
>                    >
>              <jms:JMSNamingProperty name="java.naming.factory.initial"
>                                    
>value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>              <jms:JMSNamingProperty name="java.naming.provider.host" 
>value="localhost"/>
>              <jms:JMSNamingProperty name="java.naming.provider.port" 
>value="16400"/>
>            </jms:address>
>            <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
>      </jms:conduit>
>
>      <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration"
>            p:connectionFactory-ref="connectionFactory"
>            p:targetDestination="request"
>            p:pubSubDomain="false">
>            <property name="jmsAsyncHandler" ref="jmsAsyncHandlerImpl"/>
>    </bean>
>
>    <bean id="connectionFactory" 
>class="org.objectweb.joram.client.jms.tcp.QueueTcpConnectionFactory" />
> ______________________________________________
>
> I used JORAM as my JMS providor
>
> Thanks for your kindly help :x
>
> Luong
>
>
> =========================================================================
> NGUYEN Tien Luong                    |                    M2PGI - UFRIMAG
> 13 Rue Blanche MONIER                |                    Tel : 06.45.42.46.33
> 38000 GRENOBLE                          |              http://tienluong.info
>
>
>
>
> ----- Original Message ----
> From: Christian Schneider<[email protected]>
> To: [email protected]
> Sent: Thu, 6 May, 2010 21:57:21
> Subject: Re: Using the JMS via Configuration
>
> The idea behind jmsConfig is to not use a conduit or destination at all.
> You simply use it from the jaxb client or jaxb endpoint.
> So this can save you a lot of xml config. The servicename and
> endpointname below can be chosen almost arbitrary as they are not really
> necesary but need to be filled in.
>
>    <jaxws:client id="CustomerService"
>      xmlns:greeter="http://cxf.apache.org/jms_greeter";
>      serviceName="greeter:GreeterService"
>      endpointName="greeter:GreeterPort"  address="jms://"
>      serviceClass="insert the full name of the greeter service interface 
>class here">
>      <jaxws:features>
>          <bean xmlns="http://www.springframework.org/schema/beans";
>              class="org.apache.cxf.transport.jms.JMSConfigFeature"
>              p:jmsConfig-ref="jmsConfig1"/>
>      </jaxws:features>
> </jaxws:client>
>
> <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration"
>
> p:connectionFactory-ref="connectionFactory"
> p:targetDestination="request"
> p:pubSubDomain="false">
> </bean>
>
> The error you posted looks like you could have an error in your 
> connectionFactory definition. Could you post your complete config?
>
> Greetings
>
> Christian
>
>
> Am 06.05.2010 16:19, schrieb Nguyen Tien Luong:
>    
>>      Hello, it's me one more another time :p
>>
>> I could make SOAP over JMS work with Spring bean configuration, it's great :x
>>
>> <jms:conduit 
>> name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-conduit";;>
>> <jms:clientConfig/>
>> <jms:runtimePolicymessageType="binary"/>
>> <jms:sessionPoollowWaterMark="10"highWaterMark="5000"/>
>> <jms:addressdestinationStyle="queue"
>> jndiConnectionFactoryName="cf"
>> jndiDestinationName="request"
>> jndiReplyDestinationName="reply">
>> <jms:JMSNamingProperty name="java.naming.factory.initial" 
>> value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>> <jms:JMSNamingPropertyname="java.naming.provider.host" value="localhost"/>
>> <jms:JMSNamingPropertyname="java.naming.provider.port" value="16400"/>
>> </jms:address>
>> </jms:conduit>
>>
>> <jms:destinationname="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-destination";>
>> <jms:sessionPoollowWaterMark="10"highWaterMark="5000"/>
>> <jms:addressdestinationStyle="queue" jndiConnectionFactoryName="cf" 
>> jndiDestinationName="request" jndiReplyDestinationName="reply">
>> <jms:JMSNamingProperty name="java.naming.factory.initial" 
>> value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>> <jms:JMSNamingProperty name="java.naming.provider.host" value="localhost"/>
>> <jms:JMSNamingProperty name="java.naming.provider.port" value="16400"/>
>> </jms:address>
>> </jms:destination>
>>
>> But when I want use<jms:jmsConfig-ref>  to use my owns jmsConfig  like
>>
>> <jms:conduit 
>> name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-conduit";;>
>> <jms:runtimePolicymessageType="binary"/>
>> <jms:sessionPoollowWaterMark="10"highWaterMark="5000"/>
>> <jms:addressdestinationStyle="queue" jndiConnectionFactoryName="cf" 
>> jndiDestinationName="request" jndiReplyDestinationName="reply">
>> <jms:JMSNamingPropertyname="java.naming.factory.initial" 
>> value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>> <jms:JMSNamingPropertyname="java.naming.provider.host" value="localhost"/>
>> <jms:JMSNamingPropertyname="java.naming.provider.port" value="16400"/>
>> </jms:address>
>> <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
>> </jms:conduit>
>>
>> <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration"
>> p:connectionFactory-ref="connectionFactory"
>> p:targetDestination="request"
>> p:pubSubDomain="false">
>> </bean>
>>
>> an exception raise, told me that no server's infomation was declared
>>
>> Caused by: javax.jms.JMSException: javax.jms.IllegalStateException: Could 
>> not connect to JMS server with [(hostName=null,port=0)] after 1 attempts 
>> during 0 secs: server is not listening
>>    at 
>>org.objectweb.joram.client.jms.connection.RequestMultiplexer.<init>(RequestMultiplexer.java:105)
>>    at org.objectweb.joram.client.jms.Connection.<init>(Connection.java:193)
>>    at 
>>org.objectweb.joram.client.jms.admin.AbstractConnectionFactory.createConnection(AbstractConnectionFactory.java:302)
>>    at 
>>org.objectweb.joram.client.jms.admin.AbstractConnectionFactory.createConnection(AbstractConnectionFactory.java:284)
>>    at 
>>org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:343)
>>    at 
>>org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:290)
>>    at 
>>org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:227)
>>    at 
>>org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
>>    at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:461)
>>    ... 16 more
>>
>>
>> So how can I inject correctly my<jms:jmsConfig-ref>  to make it works ?
>>
>> Thanks
>>
>>    =========================================================================
>> NGUYEN Tien Luong                    |                    M2PGI - UFRIMAG
>> 13 Rue Blanche MONIER                |              Tel : 06.45.42.46.33
>> 38000 GRENOBLE                      |              http://tienluong.info
>>
>>
>>
>>
>>
>> ________________________________
>> From: Nguyen Tien Luong<[email protected]>
>> To: [email protected]
>> Sent: Thu, 6 May, 2010 10:40:54
>> Subject: Re: Using the JMS via Configuration
>>
>> Thanks Christian for your answer,
>>
>> Do you have some config's example of JmsConfigFeature? I'd like to use it 
>> for my later implementation :)
>>
>> Thanks
>>    =========================================================================
>> NGUYEN Tien Luong                    |                    M2PGI - UFRIMAG
>> 13 Rue Blanche MONIER                |              Tel : 06.45.42.46.33
>> 38000 GRENOBLE                      |              http://tienluong.info
>>
>>
>>
>>
>>
>> ________________________________
>> From: Christian Schneider<[email protected]>
>> To: [email protected]
>> Sent: Tue, 4 May, 2010 21:26:38
>> Subject: Re: Using the JMS via Configuration
>>
>> Hi,
>>
>> I guess the problem could be that the namespace in the conduit name is 
>> missing. The problem with conduits in my opinion is that it is too easy to 
>> have a spelling error.
>> If you use the conduit then you do not need the config in the wsdl.
>>
>> I prefer to use the JmsConfigFeature. See:
>> https://cwiki.apache.org/CXF20DOC/using-the-jmsconfigfeature.html
>>
>> It is easier to configure and matches typical spring configs.
>>
>> Gretings
>>
>> Christian
>>
>>
>> Am 04.05.2010 17:32, schrieb Nguyen Tien Luong:
>>
>>      
>>> My old my is not readable, so I resend it :p
>>>
>>>
>>>
>>>      Hi,
>>>    In context of my project, I have to configure CXF in using JMS/Joram. My 
>>>example bases on jms_queue 's demonstration.
>>>    My look for this part: http://cxf.apache.org/docs/jms-transport.html
>>>    The first way with WSDL, it works well, client can send the request to 
>>>request queue, and get the answer from replyWSDL queue :
>>> <wsdl:service name="JMSGreeterService">.
>>> <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
>>> <jms:address destinationStyle="queue"
>>> jndiConnectionFactoryName="cf"
>>> jndiDestinationName="request"
>>> jndiReplyDestinationName="replyWSDL">
>>> <jms:JMSNamingProperty name="java.naming.factory.initial" 
>>> value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>>> <jms:JMSNamingProperty name="java.naming.factory.host" value="localhost"/>
>>> <jms:JMSNamingProperty name="java.naming.factory.port" value="16400"/>
>>> </jms:address>
>>> <jms:clientConfig useConduitIdSelector="false"/>
>>> </wsdl:port>
>>> </wsdl:service>
>>> I tried to do the same things with the configuration of Spring but it 
>>> didn't work.
>>> My beans.xml is like that, and it's loaded when the client starts:
>>> <beans xmlns:tx="http://www.springframework.org/schema/tx";;;
>>> xmlns:context="http://www.springframework.org/schema/context";;;
>>> xmlns="http://www.springframework.org/schema/beans";;;
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;;
>>> xmlns:jms="http://cxf.apache.org/transports/jms";;;
>>> xsi:schemaLocation="
>>> http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>> http://www.springframework.org/schema/context
>>> http://www.springframework.org/schema/context/spring-context-2.5.xsd
>>> http://www.springframework.org/schema/tx
>>> http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
>>> http://cxf.apache.org/transports/jms
>>> http://cxf.apache.org/schemas/configuration/jms.xsd";;;>
>>> <context:component-scan base-package="demo.jms_greeter.client"/>
>>> ........
>>> <!-- CXF Configuration -->
>>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>> <import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
>>> ........
>>> <jms:conduit name="{JMSGreeterService}GreeterPort.jms-conduit">
>>> <jms:address destinationStyle="queue"
>>> jndiConnectionFactoryName="cf"
>>> jndiDestinationName="request"
>>> jndiReplyDestinationName="replyWSDL">
>>> <jms:JMSNamingProperty name="java.naming.factory.initial"
>>> value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
>>> <jms:JMSNamingProperty name="java.naming.factory.host"
>>> value="localhost"/>
>>> <jms:JMSNamingProperty name="java.naming.factory.port"
>>> value="16400"/>
>>> </jms:address>
>>> </jms:conduit>
>>>    ........
>>> </beans>
>>>    So my questions are:
>>>    - Did I miss some points in beans.xml in order to make it runs?
>>> - Can I delete the config in WSDL file when I use spring bean's config?
>>> - How jms:conduit works? Each client uses its own instance of JMSConduit to 
>>> transfer the message (when there are many clients using the same WSDL)
>>>    Thanks in advanced :x
>>> =========================================================================
>>> NGUYEN Tien Luong                    |                    M2PGI - UFRIMAG   
>>>      13 Rue Blanche MONIER                |              Tel : 
>>> 06.45.42.46.33
>>> 38000 GRENOBLE                      |              http://tienluong.info
>>>
>>>
>>>
>>>
>>>
>>>        
>>
>>
>>
>>
>>      
>    

-- 
----
http://www.liquid-reality.de




Reply via email to