You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "amer.almani" <am...@gmail.com> on 2010/12/04 21:02:06 UTC
Concurrent request in JMS endpoints
Hello,
I am building a JMS scenario using cxf. I have the classic consumer/provider
scenario in one of the services.
One of my consumers try to collect its data by making an asynchronous call
to the service. The providers are trying to invoke the service but they are
queued pending the consumer release of connection.
I wonder if cxf endpoints supports concurrent requests. I thought they
behave like servlets do. It seems to me that endpoints server one requests
at a time..
Amer
--
View this message in context: http://cxf.547215.n5.nabble.com/Concurrent-request-in-JMS-endpoints-tp3292430p3292430.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Concurrent request in JMS endpoints
Posted by "amer.almani" <am...@gmail.com>.
Thank you!
You saved my day. I solved the issue that troubled me for several days!
Issue Solved...
Amer
--
View this message in context: http://cxf.547215.n5.nabble.com/Concurrent-request-in-JMS-endpoints-tp3292430p3292796.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Concurrent request in JMS endpoints
Posted by "amer.almani" <am...@gmail.com>.
Hi,
My case is that my client in invoking the service to receive its data. it
invokes it and makes a busy waiting inside waiting for its data to be
completed. The providers have their data ready but they can't invoke the
service and they are getting queued waiting for the consumer to release
connection.
I tried to your solution and i set maxConcurrentConsumers to 10 but it
doesn't work. I still get the same behavior.
Here is context:
<jaxws:client id="cashierClient"
xmlns:tns="http://cashier.service.parsdeveloper.com"
serviceName="tns:cashierService"
endpointName="tns:cashierPortType"
address="jms://"
serviceClass="com.parsdeveloper.service.cashier.CashierPortType" >
<jaxws:features>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="cashierjmsConfig" />
</jaxws:features>
</jaxws:client>
<jaxws:client id="coffeeMakerClient"
xmlns:cfm="http://coffeemaker.service.parsdeveloper.com"
serviceName="cfm:coffeeMakerService"
endpointName="cfm:coffeeMakerPortType" address="jms://"
serviceClass="com.parsdeveloper.service.coffeemaker.CoffeeMakerPortType">
<jaxws:features>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="coffeemakerjmsConfig" />
</jaxws:features>
</jaxws:client>
<jaxws:client id="beverageClient"
xmlns:bv="http://beverage.service.parsdeveloper.com"
serviceName="bv:beverageService"
endpointName="bv:beveragePortType" address="jms://"
serviceClass="com.parsdeveloper.service.beverage.BeveragePortType">
<jaxws:features>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="beveragejmsConfig" />
</jaxws:features>
</jaxws:client>
<jaxws:client id="handinClient"
xmlns:hin="http://handin.service.parsdeveloper.com"
serviceName="hin:handinService"
endpointName="hin:handinPortType" address="jms://"
serviceClass="com.parsdeveloper.service.handin.HandinPortType">
<jaxws:features>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="handinjmsConfig" />
</jaxws:features>
</jaxws:client>
<!-- Services -->
<jaxws:endpoint id="cashierService"
xmlns:tns="http://cashier.service.parsdeveloper.com"
serviceName="tns:cashierService"
endpointName="tns:cashierPortType" address="jms://"
implementor="com.parsdeveloper.service.cashier.CashierPortTypeImpl" >
<jaxws:features>
<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="cashierjmsConfig" />
</jaxws:features>
</jaxws:endpoint>
<jaxws:endpoint id="coffeeMakerService"
xmlns:cfm="http://coffeemaker.service.parsdeveloper.com"
serviceName="cfm:coffeeMakerService"
endpointName="cfm:coffeeMakerPortType" address="jms://"
implementor="com.parsdeveloper.service.coffeemaker.CoffeeMakerPortTypeImpl">
<jaxws:features>
<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="coffeemakerjmsConfig" />
</jaxws:features>
</jaxws:endpoint>
<jaxws:endpoint id="beverageService"
xmlns:bv="http://beverage.service.parsdeveloper.com"
serviceName="bv:beverageService"
endpointName="bv:beveragePortType" address="jms://"
implementor="com.parsdeveloper.service.beverage.BeveragePortTypeImpl">
<jaxws:features>
<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="beveragejmsConfig" />
</jaxws:features>
</jaxws:endpoint>
<jaxws:endpoint id="handinService"
xmlns:hin="http://handin.service.parsdeveloper.com"
serviceName="hin:handinService"
endpointName="hin:handinPortType" address="jms://"
implementor="com.parsdeveloper.service.handin.HandinPortTypeImpl">
<jaxws:features>
<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
pl:jmsConfig-ref="handinjmsConfig" />
</jaxws:features>
</jaxws:endpoint>
<bean id="cashierjmsConfig"
class="org.apache.cxf.transport.jms.JMSConfiguration"
pl:connectionFactory-ref="jmsConnectionFactory"
pl:targetDestination="cashierqueue"
/>
<bean id="coffeemakerjmsConfig"
class="org.apache.cxf.transport.jms.JMSConfiguration"
pl:connectionFactory-ref="jmsConnectionFactory"
pl:targetDestination="coffeemakerqueue" />
<bean id="beveragejmsConfig"
class="org.apache.cxf.transport.jms.JMSConfiguration"
pl:connectionFactory-ref="jmsConnectionFactory"
pl:targetDestination="beveragequeue" />
<bean id="handinjmsConfig"
class="org.apache.cxf.transport.jms.JMSConfiguration"
pl:connectionFactory-ref="jmsConnectionFactory"
pl:targetDestination="handinqueue"
pl:concurrentConsumers="2" pl:maxConcurrentConsumers="10" />
<bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="ssl://localhost:61617" />
</bean>
</property>
<property name="reconnectOnException" value="true"/>
</bean>
Christian Schneider wrote:
>
> Hi Amer,
>
> have you tried using the settings concurrentConsumers and
> maxConcurrentConsumers. These settings default to 1 but you can use
> higher settings here.
> Besides that you can influence the number of threads that are spawned
> after receiving the messages (maxConcurrentTasks).
>
> See http://cxf.apache.org/docs/using-the-jmsconfigfeature.html
>
> Best regards
>
> Christian
>
>
> Am 04.12.2010 21:02, schrieb amer.almani:
>> Hello,
>>
>> I am building a JMS scenario using cxf. I have the classic
>> consumer/provider
>> scenario in one of the services.
>> One of my consumers try to collect its data by making an asynchronous
>> call
>> to the service. The providers are trying to invoke the service but they
>> are
>> queued pending the consumer release of connection.
>>
>> I wonder if cxf endpoints supports concurrent requests. I thought they
>> behave like servlets do. It seems to me that endpoints server one
>> requests
>> at a time..
>>
>>
>> Amer
>
> --
> ----
> http://www.liquid-reality.de
>
>
>
--
View this message in context: http://cxf.547215.n5.nabble.com/Concurrent-request-in-JMS-endpoints-tp3292430p3292784.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Concurrent request in JMS endpoints
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Amer,
have you tried using the settings concurrentConsumers and
maxConcurrentConsumers. These settings default to 1 but you can use
higher settings here.
Besides that you can influence the number of threads that are spawned
after receiving the messages (maxConcurrentTasks).
See http://cxf.apache.org/docs/using-the-jmsconfigfeature.html
Best regards
Christian
Am 04.12.2010 21:02, schrieb amer.almani:
> Hello,
>
> I am building a JMS scenario using cxf. I have the classic consumer/provider
> scenario in one of the services.
> One of my consumers try to collect its data by making an asynchronous call
> to the service. The providers are trying to invoke the service but they are
> queued pending the consumer release of connection.
>
> I wonder if cxf endpoints supports concurrent requests. I thought they
> behave like servlets do. It seems to me that endpoints server one requests
> at a time..
>
>
> Amer
--
----
http://www.liquid-reality.de