camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Bray <>
Subject JMS Component WebSphere/MQ Connection issues
Date Wed, 24 Oct 2012 05:08:59 GMT
Hi All, 

I am running an Apache Camel application inside of WebSphere Application
Server v7. 


Our application uses the Camel JMS component to retrieve a JMS connection
factory from JNDI and uses this to receive messages from a Remote WebSphere
MQ Bus: 

	<jee:jndi-lookup id="connectionFactory" jndi-name="${}" />

 	CACHE_NONE is required when running in WAS Work Manager

	<bean id="MQSeries" class="org.apache.camel.component.jms.JmsComponent">
		Must be set to false for XA transactions. The name of this property 
			is misleading. What it really indicates is whether or not the Camel JMS
			supports local transactions. For XA transactions, on the other hand, you 
			must set this property to false and initialize the transactionManager
			with a reference to an XA transaction manager.
		<property name="transacted" value="true" />
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="deliveryPersistent" value="${delivery.persistent}" />
		<property name="timeToLive" value="${}" />
		<property name="concurrentConsumers" value="${jms.concurrent.consumers}"
		<property name="taskExecutor" ref="taskExecutor" />
		<property name="cacheLevelName" value="CACHE_NONE" />
		<property name="receiveTimeout" value="#{${}
* 1000}" />
		<property name="recoveryInterval" value="#{${}
* 1000}" />

As we are running inside of the WAS J2EE server we are explicitly setting
the Cache mode to CACHE_NONE and delegating, connection and session pooling
and threading to the WAS Container.


We are observing some strange behavior in that it appears that our
application is requiring at least 2x as many connections as expected. i.e.
if we set ${jms.concurrent.consumers} = 6 our application will open at least
12 connections only 6 of which appear to be being actively used. 

If we modify the WAS JCA connection pool settings to enforce a maximum of 6
connections by setting 

Connection pool size (Max=6 Min=1)
Session pool size (Max=1 Min=1)

We are seeing that our application is being starved of connections: 

[24/10/12 10:43:38:746 EST] 0000001b FreePool      E   J2CA0045E: Connection
not available while invoking method createOrWaitForConnection for resource
[24/10/12 10:43:38:746 EST] 0000002d FreePool      E   J2CA0045E: Connection
not available while invoking method createOrWaitForConnection for resource
[24/10/12 10:43:38:762 EST] 0000002d SystemOut     O 2012-10-24 10:43:38,762
[WorkManager.OTCWorkManager : 7] WARN 
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer - Setup of
JMS message listener invoker failed for destination 'FEED.UNBUNDLED' -
trying to recover. Cause: Could not create JMS transaction; nested exception
is javax.jms.JMSException: Failed to create session

Is anyone running Camel on WAS? If so has anyone observed similar behavior

Any info you could provide would be much appreciated. 

Patrick Bray 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message