You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by venu <go...@lls.org> on 2006/08/08 20:01:32 UTC
ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy
I am trying to figure out how i can set the redelivery options to redeliver
the messages. I am using ActiveMQ 4.0.1 with Jencks 1.2. Here is the snippet
of code i am using to set the re delivery options in the Jencks
configuration. I am doing the transaction rollback when there is any
exception but i don't see message is being redelivered.
Is anyone able to make the redelivery work using ActiveMQ 4.0.1 with Jencks?
<bean id="jmsResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl">
<value>@@transport.url@@</value>
</property>
<property name="initialRedeliveryDelay">
<value>30000</value>
</property>
<property name="maximumRedeliveries">
<value>5</value>
</property>
<property name="redeliveryUseExponentialBackOff">
<value>true</value>
</property>
<property name="redeliveryBackOffMultiplier">
<value>2</value>
</property>
</bean>
Thanks,
Venu.
--
View this message in context: http://www.nabble.com/ActiveMQ4.0.1-%2B-Jencks-1.2-Redelivery-Policy-tf2074242.html#a5711799
Sent from the ActiveMQ - User forum at Nabble.com.
Re: ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy
Posted by venu <go...@lls.org>.
As i am making changes in my existing application(upgrading form 3.2.1 to
4.0.1), i didn't come up with JUnit test case but here i am posting the
configuration i am using.
I tested the re delivery with the example tools came with ActiveMQ 4.0.1 and
redelivery works fine but it doesn't work with Jencks. Am i misisng
anything?
Broker:
--------
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="cluster" useJmx="true">
<persistenceAdapter>
<journaledJDBC dataSource="#mssqlserver-ds"/>
</persistenceAdapter>
<transportConnectors>
<transportConnector uri="tcp://localhost:61616"/>
</transportConnectors>
</broker>
<bean id="mssqlserver-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="net.sourceforge.jtds.jdbc.Driver"/>
<property name="url" value=""/>
<property name="username" value="user"/>
<property name="password" value="password"/>
<property name="initialSize" value="5"/>
</bean>
</beans>
Jencks:
----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="jencks" class="org.jencks.JCAContainer">
<property name="bootstrapContext">
<bean class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="@@threadpool.size@@"/>
</bean>
</property>
<property name="resourceAdapter">
<ref local="jmsResourceAdapter"/>
</property>
</bean>
<bean id="emailConnector" class="org.jencks.JCAConnector">
<property name="jcaContainer" ref="jencks"/>
<property name="activationSpec">
<bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
<property name="destination" value="EmailQueue"/>
<property name="destinationType" value="javax.jms.Queue"/>
</bean>
</property>
<property name="transactionManager" ref="userTransaction"/>
<property name="ref" value="emailConsumer"/>
</bean>
<bean id="jmsResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl">
<value>@@transport.url@@</value>
</property>
<property name="initialRedeliveryDelay">
<value>30000</value>
</property>
<property name="maximumRedeliveries">
<value>5</value>
</property>
<property name="redeliveryUseExponentialBackOff">
<value>true</value>
</property>
<property name="redeliveryBackOffMultiplier">
<value>2</value>
</property>
</bean>
<!-- Geronimo Transaction Manager -->
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
<bean id="userTransaction"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/>
<bean id="jtaTransactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransaction" ref="userTransaction" />
</bean>
<bean id="emailConsumer" class="........">
</bean>
<!-- <bean id="userTransaction"
class="org.springframework.transaction.jta.JotmFactoryBean"/>
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransaction">
<ref local="userTransaction"/>
</property>
</bean>
<bean id="txnProxy" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="onMessage">PROPAGATION_REQUIRED, -Exception</prop>
</props>
</property>
<property name="proxyInterfaces" value="javax.jms.MessageListener"/>
</bean>
-->
</beans>
--
View this message in context: http://www.nabble.com/ActiveMQ4.0.1-%2B-Jencks-1.2-Redelivery-Policy-tf2074242.html#a5712559
Sent from the ActiveMQ - User forum at Nabble.com.
Re: ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy
Posted by James Strachan <ja...@gmail.com>.
Could you submit a JUnit test case that demonstrates your issue please?
http://incubator.apache.org/activemq/support.html
On 8/8/06, venu <go...@lls.org> wrote:
>
> I am trying to figure out how i can set the redelivery options to redeliver
> the messages. I am using ActiveMQ 4.0.1 with Jencks 1.2. Here is the snippet
> of code i am using to set the re delivery options in the Jencks
> configuration. I am doing the transaction rollback when there is any
> exception but i don't see message is being redelivered.
>
> Is anyone able to make the redelivery work using ActiveMQ 4.0.1 with Jencks?
>
> <bean id="jmsResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> <property name="serverUrl">
> <value>@@transport.url@@</value>
> </property>
> <property name="initialRedeliveryDelay">
> <value>30000</value>
> </property>
> <property name="maximumRedeliveries">
> <value>5</value>
> </property>
> <property name="redeliveryUseExponentialBackOff">
> <value>true</value>
> </property>
> <property name="redeliveryBackOffMultiplier">
> <value>2</value>
> </property>
>
> </bean>
>
> Thanks,
> Venu.
> --
> View this message in context: http://www.nabble.com/ActiveMQ4.0.1-%2B-Jencks-1.2-Redelivery-Policy-tf2074242.html#a5711799
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/