title: HornetQ Queue has transaction timeout
body: <p>I've used EJB to implement Command pattern. EJB is a command service that execute a business logic. I known in J2EE that EJB manage transaction and also transaction timeout.</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:transactions:1.1"&gt;
      &lt;core-environment&gt;
          &lt;process-id&gt;
              &lt;uuid/&gt;
          &lt;/process-id&gt;
      &lt;/core-environment&gt;
      &lt;recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/&gt;
      &lt;coordinator-environment default-timeout="600"/&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>As configuration I shown, transaction is managed and just allow maximum 600 seconds to process. Sometimes, my app take longer than 600 seconds to process to database, and right after that I try to send a message to a queue and I get this error.</p>
  
  <pre><code>21:34:50,085 ERROR [org.hornetq.ra.HornetQRASessionFactoryImpl] (Thread-102) Could not create session: javax.resource.ResourceException: IJ000460: Error checking for a transaction
      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
      at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:837)
      at org.hornetq.ra.HornetQRASessionFactoryImpl.createQueueSession(HornetQRASessionFactoryImpl.java:237)
      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24]
  Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple &lt; ac, BasicAction: 0:ffff0a01071e:2dde2ba2:5514d7c5:d1 status: ActionStatus.ABORTED &gt;
      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)
      ... 63 more
  
  21:34:50,117 ERROR [stderr] (Thread-102) javax.jms.JMSException: Could not create a session: IJ000460: Error checking for a transaction
  
  21:34:50,118 ERROR [stderr] (Thread-102)    at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:881)
  
  21:34:50,119 ERROR [stderr] (Thread-102)    at org.hornetq.ra.HornetQRASessionFactoryImpl.createQueueSession(HornetQRASessionFactoryImpl.java:237)
  </code></pre>
  
  <p>I can resolve it by increase transaction timeout value. But it's not a good solution. Anyone can tell me another way to do.</p>