Note that the PooledConnectionFactory is only designed for sending of
messages - and is purely designed for folks using Spring's
JmsTemplate to send messages without under the covers creating and
closing a MessageProducer for every message sent.
If you want to pool connections/sessions/consumers for the inbound
consumption of messages we recommend using either
* Message Driven Beans in a J2EE container like Geronimo
* Message Driven POJOs using Jencks (http://jencks.org/)
* try Spring JMS in Spring 2.0 - though this does not support XA AFAIK
James
On 25 Feb 2006, at 15:44, Alex Thieme wrote:
Hello,
I am currently running with version 3.2.1, an embedded broker, with
clients using the reliable protocol, and a pooled connection
factory (all defined using Spring, if that makes a difference).
After some time running, sending messages successfully, the
producers (to a few queues) are still able to send messages, but
the corresponding consumers are no longer able to receive. The call
to receive returns null, and does not throw an Exception.
As a test, I switched to NOT use the pooled connection factory, and
low and behold my tests ran to completion (i.e. consumers were able
to receive all messages where before they would have failed).
The Spring configuration I am using is included below (both the
pooled and non-pooled versions).
Incidentally, I added the "useAsyncSend" property to the connection
factory in an attempt to speed things up and and ?keepAliveTime=-1
to my broker in an attempt to say "don't ever consider the
connection to be dead". I don't know if either of these are
relevant, used, etc. I'm open to other properties/options to make
things more reliable (required) and perform as fast as possible
(desired).
I see there was an update to 3.2.2; but, I don't see anything in
the change log that speaks to this type of problem.
Thanks in advance for any help.
Alex
BTW, I apologize for the repost (originally sent to activemq-
users); but, I wasn't sure where the right place was to post this,
and that list didn't seem to be all that active.
<!-- working version -->
<bean id="Jms.ConnectionFactory.Embedded"
class="org.activemq.ActiveMQConnectionFactory"
singleton="true"
lazy-init="true">
<property name="brokerURL" ref="Jms.BrokerUrl"/>
<property name="useAsyncSend" value="true"/>
<property name="useEmbeddedBroker" value="true"/>
</bean>
<!-- A connection factory, expects broker to be running already
-->
<bean id="Jms.ConnectionFactory"
class="org.activemq.ActiveMQConnectionFactory"
singleton="true"
lazy-init="true">
<property name="brokerURL" ref="Jms.BrokerUrl"/>
<property name="useAsyncSend" value="true"/>
<property name="useEmbeddedBroker" value="false"/>
</bean>
<!-- Non-working version -->
<!-- A connection factory, using the embedded broker -->
<bean id="Jms.ConnectionFactory.Pooled.Embedded"
class="org.activemq.pool.PooledConnectionFactory"
singleton="true"
lazy-init="true">
<property name="connectionFactory">
<bean class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" ref="Jms.BrokerUrl"/>
<property name="useAsyncSend" value="true"/>
<property name="useEmbeddedBroker" value="true"/>
</bean>
</property>
</bean>
<!-- A connection factory, expects broker to be running already
-->
<bean id="Jms.ConnectionFactory.Pooled"
class="org.activemq.pool.PooledConnectionFactory"
singleton="true"
lazy-init="true">
<property name="connectionFactory">
<bean class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" ref="Jms.BrokerUrl"/>
<property name="useAsyncSend" value="true"/>
<property name="useEmbeddedBroker" value="false"/>
</bean>
</property>
</bean>
James
-------
http://radio.weblogs.com/0112098/