title: Connection could not be created: javax.resource.ResourceException: IJ000460: Error checking for a transaction
body: <p>We are getting the following exception while getting an <code>ActiveMQConnection</code> in our <code>MDBClient</code> class:</p>
  <pre><code>[org.apache.activemq.ra.ActiveMQConnectionFactory:100] (default-threads - 8) Connection could not be created:: javax.resource.ResourceException: IJ000460: Error checking for a transaction
      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:435)
      at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:789)
      at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:94)
      at org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:67)
    Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=Local transaction (delegate=TransactionImple &lt; ac, BasicAction: 0:ffff0a91021d:6d03d951:608a090d:2d5 status: ActionStatus.ABORTED &gt;, owner=Local transaction context for provider JBoss JTA transaction provider)
      at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:419)
  </code></pre>
  <p>The code for getting connection is below. Error is happening on <code>connectionFactory.createConnection();</code> One transaction is successful but all the subsequent transactions are failing with this error.</p>
  <p>Our application is running on WildFly 21 and ActiveMQ 5.12.1. ActiveMQ is connected to WildFly through the ActiveMQ JCA Resource Adapter</p>
  <pre class="lang-java prettyprint-override"><code>ConnectionFactory connectionFactory = serviceLocator.getConnectionFactory(&quot;java:/ActiveMQ/QueueConnectionFactory&quot;);
  Connection connection = connectionFactory.createConnection();
  Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
  Destination destination = serviceLocator.getDestination(conf.getProperty(SystemConfig.OUTPUT_QUEUE_JNDI_NAME));
  MessageProducer messageProducer = session.createProducer(destination);
  </code></pre>
  <p>Any help is much appreciated.</p>