cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@progress.com>
Subject Re: JMS queues and multiple consumer threads
Date Mon, 17 Nov 2008 12:30:21 GMT
Looking at the traces again, I think the problem might be to do with the spring connection
factory

For ex, this a trace for a failing test with 2 threads involved

>> 14000 [pool-1-thread-1] INFO org.springframework.jms.connection.SingleConnectionFactory
- Established shared JMS Connection:

and here's the trace for a green test :

> 14594 [pool-1-thread-2] INFO org.springframework.jms.connection.SingleConnectionFactory
- Established shared JMS Connection:

So I guess what happens is that if in my test the thread which expects the notification from
the other thread squeezes in first, 
then it actually is never awaken (it does hit the application code though), while the other
one is waiting on the client side.

So I guess the question is how to configure a client side connection factory's thread pool
?

Thanks, Sergey


> Hi
>
> I have a system JMS test which involves multiple consumer threads hitting a single provider
endpoint which is a JMS queue and 
> expecting some response.
>
> If more than 1 consumer thread is involved than I can often see a server side being unable
even to get a given invocation to the 
> endpoint application code.
>
> For ex, with 2 threads involved, here's a failed test :
>
> // S.B - this is happening on the consumer side I believe :
>
> 14000 [pool-1-thread-1] INFO org.springframework.jms.connection.SingleConnectionFactory
- Established shared JMS Connection: 
> ActiveMQConnection {id=ID:sberyoz-4729-1226923006536-1:1,clientId=null,started=false}
>
> // S.B : I added these printlns :
> Receieve timeout******** : 500000
> Receieve timeout******** : 500000
> //S.B This is a server side now
> 17-Nov-2008 11:56:48 org.apache.cxf.transport.jms.JMSDestination onMessage
> FINE: server received request:
> 17-Nov-2008 11:56:48 org.apache.cxf.transport.jms.JMSDestination onMessage
> FINE: The Request Message is [ [B@1465ca2]
>
> and this is basically, the println in an application code is not even hit.
>
> Now, same test with 2 threads succeeding :
>
> // S.B. : client side
>
> 14594 [pool-1-thread-2] INFO org.springframework.jms.connection.SingleConnectionFactory
- Established shared JMS Connection: 
> ActiveMQConnection {id=ID:sberyoz-4775-1226923455594-1:1,clientId=null,started=false}
> Receieve timeout******** : 500000
> Receieve timeout******** : 500000
> // S.B. The first thread has managed to get through
> 7-Nov-2008 12:04:17 org.apache.cxf.transport.jms.JMSDestination onMessage
> INFO: The Request Message is [ [B@148c02f]
> Getting continuation for Fred
> Suspending invocation for Fred
> Request message has been suspended
> ....
>
> // S.B the second one is lucky too
> 17-Nov-2008 12:04:17 org.apache.cxf.transport.jms.JMSDestination onMessage
> INFO: The Request Message is [ [B@115470e]
> Invocation for Fred has been suspended
>
> Can someone help me to figure why I'm seeing this transient behaviour ?
>
> here's a wsdl configuration (which I copied from the other test's wsdl) shared by all
the consumer threads and by the provider 
> endpoint :
>
> <service name="HelloContinuationService">
> <port binding="tns:HelloContinuationServiceSoapBinding" name="HelloContinuationPort">
> <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
> <jms:serverConfig messageTimeToLive="500000"/>
> <jms:address
> jndiConnectionFactoryName="ConnectionFactory"
> jndiDestinationName="dynamicQueues/test.jmstransport.text">
> <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
> <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
> </jms:address>
> <jms:server durableSubscriberName="CXF_subscriber"/>
> </port>
> </service>
>
> Thanks, Sergey
>
> 



Mime
View raw message