activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venu <gogine...@lls.org>
Subject Re: ActiveMQ4.0.1 + Jencks 1.2 Redelivery Policy
Date Tue, 08 Aug 2006 18:43:38 GMT

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.


Mime
View raw message