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
>
>
>
>