Thanks James for your explanation on Connection Factories,

Now I am using Jencks for inbound. I am throwing a Runtime exception in
order to test max redelivery setting (I couldn't find any better way to
test with MDPs). If there are no exceptions thrown from MDP messages
could be consumed continuously. But as soon as an exception is thrown
MDP no longer receives messages. Only way to get those consumed is
restart the app with consumers again and again. Each time I see
rediliveryCount has been increased by 1 for any message remained the
queue.

This is how I have configured "maximumRedeliveries"

  <bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
    <property name="serverUrl" value="tcp://192.121.139.110:61416"/>
    <property
name="initialRedeliveryDelay"><value>2000</value></property>
        <property name="maximumRedeliveries"><value>3</value></property>
        <property
name="redeliveryBackOffMultiplier"><value>2</value></property>
        <property
name="redeliveryUseExponentialBackOff"><value>true</value></property>
        <property name="allPrefetchValues"><value>1</value></property> 
  </bean>

  <bean id="jencks" class="org.jencks.JCAContainer">
        <property name="bootstrapContext">
        <bean class="org.jencks.factory.BootstrapContextFactoryBean">
          <property name="transactionManager" ref="transactionManager"/>
          <property name="threadPoolSize" value="25"/>
        </bean> 
        </property>
    <property name="resourceAdapter" ref="activeMQResourceAdapter" />
  </bean>

Am I missing anything here? Thank you in advance for any idea on this

-Nilantha

-----Original Message-----
From: James Strachan [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 02, 2007 8:02 AM
To: users@activemq.apache.org
Subject: Re: No effect on maximumRedeliveries setting

------

So just to make things 100% clear - the purpose of
PooledConnectionFactory is only for use outside of a J2EE container
and when not using JCA - for users who want to use Spring's
JmsTemplate (i.e. for sending messages only).

For an example of inbound and outbound messaging with JCA here you
go....

inbound
http://jencks.org/Message+Driven+POJOs

outbound
http://jencks.org/Outbound+JMS

Note that neither examples use PooledConnectionFactory since JCA does
all the pooling for you for both inbound and outbound (as well as
registering with XA etc)

-- 

James
-------
http://radio.weblogs.com/0112098/

Reply via email to