0 Replies Latest reply on Apr 1, 2011 9:45 AM by Denis Sukhoroslov

    weird TransactionManager behavior

    Denis Sukhoroslov Newbie

      Hi,

       

      In my app I have two JMS consumers: one listens on external Tibco topic, the second one gets messages from NMR (local ActiveMQ). Both consumers are transactional. When I turned DEBUG log level for springframework.jms on I found that Spring Tx manager open and commit transaction every sec, on each connection:

       

      17:38:27,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24993:1,started=false}]
      17:38:27,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24994:1,started=false}]
      17:38:27,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:27,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:27,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24995:1,started=false}]
      17:38:27,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:27,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:27,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:27,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:27,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24998:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:24998,clientId=ID:dsuhoroslov-2414-1301658368227-6:21616,started=false}]
      17:38:27,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25000:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25000,clientId=ID:dsuhoroslov-2414-1301658368227-6:21618,started=false}]
      17:38:27,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24999:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:24999,clientId=ID:dsuhoroslov-2414-1301658368227-6:21617,started=false}]
      17:38:27,530 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,530 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24996:1,started=false}]
      17:38:27,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24997:1,started=false}]
      17:38:27,530 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:27,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:27,530 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:27,530 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:27,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25002:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25002,clientId=ID:dsuhoroslov-2414-1301658368227-6:21620,started=false}]
      17:38:27,546 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25001:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25001,clientId=ID:dsuhoroslov-2414-1301658368227-6:21619,started=false}]
      17:38:27,546 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:27,546 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [com.tibco.tibjms.TibjmsSession@125789c]
      17:38:27,718 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,046 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [com.tibco.tibjms.TibjmsSession@1a04d0a] from Connection [TopicConnection[ClientId=null Connected=tcp://fragmtpmu1.de.db.com:14322, URL=tcp://fragmtpmu1.de.db.com:14322]]
      17:38:28,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:28,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24998:1,started=false}]
      17:38:28,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:28,218 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25000:1,started=false}]
      17:38:28,218 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:28,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:24999:1,started=false}]
      17:38:28,218 | WARN  | /127.0.0.1:61616 | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Transport (localhost/127.0.0.1:61616) failed to tcp://localhost:61616 , attempting to automatically reconnect due to: java.io.EOFException
      17:38:28,218 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:28,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:28,218 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:28,234 | DEBUG | tenerContainer-1 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25003:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25003,clientId=ID:dsuhoroslov-2414-1301658368227-6:21621,started=false}]
      17:38:28,234 | DEBUG | tenerContainer-4 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25004:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25004,clientId=ID:dsuhoroslov-2414-1301658368227-6:21622,started=false}]
      17:38:28,234 | DEBUG | tenerContainer-3 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25005:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25005,clientId=ID:dsuhoroslov-2414-1301658368227-6:21623,started=false}]
      17:38:28,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:28,530 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25002:1,started=false}]
      17:38:28,546 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,546 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Initiating transaction commit
      17:38:28,546 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Committing JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25001:1,started=false}]
      17:38:28,546 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
      17:38:28,546 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:28,546 | INFO  | ActiveMQ Task    | FailoverTransport                | 43 - org.apache.activemq.activemq-core - 5.4.2.fuse-01-00 | Successfully connected to tcp://localhost:61616
      17:38:28,546 | DEBUG | tenerContainer-5 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25006:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25006,clientId=ID:dsuhoroslov-2414-1301658368227-6:21624,started=false}]
      17:38:28,546 | DEBUG | tenerContainer-2 | JmsTransactionManager            | 74 - org.springframework.transaction - 3.0.5.RELEASE | Created JMS transaction on Session [ActiveMQSession {id=ID:dsuhoroslov-2414-1301658368227-2:25007:1,started=false}] from Connection [ActiveMQConnection {id=ID:dsuhoroslov-2414-1301658368227-2:25007,clientId=ID:dsuhoroslov-2414-1301658368227-6:21625,started=false}]
      

       

      is it correct behavior? I afraid I configured my beans.xml wrong.

       

      Thanks, Denis.