activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sören Meier (Created) (JIRA) <j...@apache.org>
Subject [jira] [Created] (AMQ-3650) Only 7 retries after XA Rollback
Date Wed, 04 Jan 2012 10:09:38 GMT
Only 7 retries after XA Rollback
--------------------------------

                 Key: AMQ-3650
                 URL: https://issues.apache.org/jira/browse/AMQ-3650
             Project: ActiveMQ
          Issue Type: Bug
          Components: activemq-camel
    Affects Versions: 5.5.1
         Environment: MacOS X Lion but should also happen on other operation systems
            Reporter: Sören Meier


If I put a message on a queue an receive those message inside a xa session the message will
only be received 7 times if I rollback the session after having received the message. I would
expect that the message will be received as long as that message does not time out. I thought
there might be a configuration option to change that behaviour but I have not found anything
like that.

You may reproduce the Error using the atomikos transaction manager like this:

       public void testTest() throws Exception{
      System.setProperty("com.atomikos.icatch.service", "com.atomikos.icatch.standalone.UserTransactionServiceFactory");
      System.setProperty("com.atomikos.icatch.no_file", "true");
      UserTransactionManager transactionManager = new UserTransactionManager();
      transactionManager.init();
      ActiveMQXAConnectionFactory activeMQXAConnectionFactory = new ActiveMQXAConnectionFactory("tcp://localhost:61616");
      XAConnection xaConn = activeMQXAConnectionFactory.createXAConnection();
      
      xaConn.start();
      Session session = xaConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      session.createProducer(session.createQueue("testQueue")).send(session.createTextMessage("tests"),DeliveryMode.NON_PERSISTENT,1,0);
      session.close();
      for (int i=0;i<100;i++) {
         transactionManager.begin();
         XASession xaSession = xaConn.createXASession();
         transactionManager.getTransaction().enlistResource(xaSession.getXAResource());
         MessageConsumer consumer = xaSession.createConsumer(xaSession.createQueue("testQueue"));
         Message receive = consumer.receive(3000);
         assertNotNull(receive);
         transactionManager.rollback();
         consumer.close();
      }
      
      
   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message