0 Replies Latest reply on Apr 28, 2002 8:19 PM by David Jencks

    YET ANOTHER CHANGE IN JBOSS 3!

    David Jencks Master

      Hello,
      I am using the following scenario: from an external client, I start a User Transaction; inside this transaction I call some EJB methods who will connect to an external resource (Trellix) through a resource adapter. Here is the code from within the EJB component:
      com.whatever.ra.Trellix.Connection trellixConnection = null;
      try {
      com.whatever.ra.Trellix.ConnectionFactoryImpl trellixFactory = (com.whatever.ra.Trellix.ConnectionFactoryImpl)initialContext.lookup("java:/Trellix");
      trellixConnection = trellixFactory.getConnection();
      trellixConnection.addLine(new Date(System.currentTimeMillis()).toString() + text);
      }
      catch(Exception exception){}
      finally {trellixConnection.close();}

      During execution, apparently everything goes fine with the external resource, but I've noticed a strange behaviour during subsequent executions. Here is the output from JBOSS (displayed messages are pretty self-explanatory, I think):


      ------------ Execution 1 ----------------
      2002-05-09 13:31:47,153 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      2002-05-09 13:31:47,240 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createManagedConnection - Creates a new physical connection to the underlying EIS resource manager,
      2002-05-09 13:31:47,241 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createPhysicalConnection - Creates a Connection Factory instance.
      2002-05-09 13:31:47,270 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - Public Constructor
      2002-05-09 13:31:47,289 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - getFileManagementConnection
      2002-05-09 13:31:47,293 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION : Public Constructor
      2002-05-09 13:31:47,336 INFO [STDOUT] TRELLIX: XAResourceImpl : public constructor
      2002-05-09 13:31:47,352 INFO [STDOUT] TRELLIX: LOCAL_TRANSACTION_IMPL : public constructor
      2002-05-09 13:31:47,380 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: addConnectionEventListener - Adds a connection event listener to the ManagedConnection instance.
      2002-05-09 13:31:47,383 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@4492fb
      2002-05-09 13:31:47,388 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@4492fb with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//0, BranchQual=1]
      2002-05-09 13:31:47,389 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      2002-05-09 13:31:47,401 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      2002-05-09 13:31:47,407 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      2002-05-09 13:31:47,409 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@8706f6
      2002-05-09 13:31:47,411 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      2002-05-09 13:31:47,416 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:31:47,419 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@4492fb
      2002-05-09 13:31:47,421 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:31:47,422 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:31:47,425 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@cafa1
      2002-05-09 13:31:47,428 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@4492fb
      2002-05-09 13:31:47,431 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:31:47,498 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK


      ------------ Execution 2 ----------------
      2002-05-09 13:32:17,083 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      2002-05-09 13:32:17,084 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Returns a matched connection from the candidate set of connections.
      2002-05-09 13:32:17,086 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Yoopppppppieeeeeeeeeeeee
      2002-05-09 13:32:17,089 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@4492fb
      2002-05-09 13:32:17,091 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@4492fb with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//1, BranchQual=1]
      2002-05-09 13:32:17,093 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      2002-05-09 13:32:17,095 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      2002-05-09 13:32:17,097 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      2002-05-09 13:32:17,098 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@8706f6
      2002-05-09 13:32:17,100 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      2002-05-09 13:32:17,103 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@cafa1
      2002-05-09 13:32:17,106 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@4492fb
      2002-05-09 13:32:17,107 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:32:17,148 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK


      ------------ Execution 3 ----------------
      2002-05-09 13:32:44,806 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      2002-05-09 13:32:44,808 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createManagedConnection - Creates a new physical connection to the underlying EIS resource manager,
      2002-05-09 13:32:44,809 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createPhysicalConnection - Creates a Connection Factory instance.
      2002-05-09 13:32:44,816 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - Public Constructor
      2002-05-09 13:32:44,818 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - getFileManagementConnection
      2002-05-09 13:32:44,819 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION : Public Constructor
      2002-05-09 13:32:44,822 INFO [STDOUT] TRELLIX: XAResourceImpl : public constructor
      2002-05-09 13:32:44,823 INFO [STDOUT] TRELLIX: LOCAL_TRANSACTION_IMPL : public constructor
      2002-05-09 13:32:44,824 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: addConnectionEventListener - Adds a connection event listener to the ManagedConnection instance.
      2002-05-09 13:32:44,827 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:32:44,829 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@e4d0cd with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//2, BranchQual=1]
      2002-05-09 13:32:44,831 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      2002-05-09 13:32:44,832 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      2002-05-09 13:32:44,835 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      2002-05-09 13:32:44,836 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@b38cdc
      2002-05-09 13:32:44,837 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      2002-05-09 13:32:44,841 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:32:44,842 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:32:44,844 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:32:44,846 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:32:44,847 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@484c6b
      2002-05-09 13:32:44,850 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:32:44,851 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:32:44,911 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK


      ------------ Execution 4 ----------------
      2002-05-09 13:33:15,322 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Returns a matched connection from the candidate set of connections.
      2002-05-09 13:33:15,323 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Yoopppppppieeeeeeeeeeeee
      2002-05-09 13:33:15,325 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:33:15,327 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@e4d0cd with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//3, BranchQual=1]
      2002-05-09 13:33:15,330 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: associateConnection - Used by the container to change the association of an application-level connection handle with a ManagedConneciton instance.
      2002-05-09 13:33:15,345 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      2002-05-09 13:33:15,346 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createManagedConnection - Creates a new physical connection to the underlying EIS resource manager,
      2002-05-09 13:33:15,348 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createPhysicalConnection - Creates a Connection Factory instance.
      2002-05-09 13:33:15,355 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - Public Constructor
      2002-05-09 13:33:15,356 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - getFileManagementConnection
      2002-05-09 13:33:15,358 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION : Public Constructor
      2002-05-09 13:33:15,361 INFO [STDOUT] TRELLIX: XAResourceImpl : public constructor
      2002-05-09 13:33:15,362 INFO [STDOUT] TRELLIX: LOCAL_TRANSACTION_IMPL : public constructor
      2002-05-09 13:33:15,363 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: addConnectionEventListener - Adds a connection event listener to the ManagedConnection instance.
      2002-05-09 13:33:15,366 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      2002-05-09 13:33:15,367 INFO [STDOUT] TRELLIX: XAResourceImpl:IS_SAME_RM - COMPARING com.whatever.ra.Trellix.XAResourceImpl@2c7ac5 AND com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:33:15,371 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@2c7ac5 with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//3, BranchQual=2]
      2002-05-09 13:33:15,372 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      2002-05-09 13:33:15,374 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      2002-05-09 13:33:15,376 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      2002-05-09 13:33:15,377 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@62e703
      2002-05-09 13:33:15,379 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      2002-05-09 13:33:15,382 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:33:15,384 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      2002-05-09 13:33:15,385 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:33:15,387 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      2002-05-09 13:33:15,389 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@303a60
      2002-05-09 13:33:15,391 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@e4d0cd
      2002-05-09 13:33:15,393 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:33:15,395 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      2002-05-09 13:33:15,396 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      2002-05-09 13:33:15,449 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK
      2002-05-09 13:33:15,450 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK


      ------------ Execution 5 ----------------
      13:33:51,262 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Returns a matched connection from the candidate set of connections.
      13:33:51,264 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Yoopppppppieeeeeeeeeeeee
      13:33:51,266 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      13:33:51,268 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@2c7ac5 with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//4, BranchQual=1]
      13:33:51,270 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: associateConnection - Used by the container to change the association of an application-level connection handle with a ManagedConneciton instance.
      13:33:51,272 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: associateConnection - Used by the container to change the association of an application-level connection handle with a ManagedConneciton instance.
      13:33:51,341 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      13:33:51,343 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createManagedConnection - Creates a new physical connection to the underlying EIS resource manager,
      13:33:51,356 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: createPhysicalConnection - Creates a Connection Factory instance.
      13:33:51,377 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - Public Constructor
      13:33:51,379 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION_FACTORY: - getFileManagementConnection
      13:33:51,392 INFO [STDOUT] TRELLIX: FILE_MANAGEMENT_CONNECTION : Public Constructor
      13:33:51,405 INFO [STDOUT] TRELLIX: XAResourceImpl : public constructor
      13:33:51,406 INFO [STDOUT] TRELLIX: LOCAL_TRANSACTION_IMPL : public constructor
      13:33:51,408 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: addConnectionEventListener - Adds a connection event listener to the ManagedConnection instance.
      13:33:51,410 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@1a9310
      13:33:51,411 INFO [STDOUT] TRELLIX: XAResourceImpl:IS_SAME_RM - COMPARING com.whatever.ra.Trellix.XAResourceImpl@1a9310 AND com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      13:33:51,415 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@1a9310 with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//4, BranchQual=2]
      13:33:51,416 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      13:33:51,418 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      13:33:51,425 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      13:33:51,427 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@ec42e0
      13:33:51,428 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      13:33:51,431 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      13:33:51,433 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@1a9310
      13:33:51,435 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      13:33:51,437 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      13:33:51,438 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@ad093c
      13:33:51,441 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: cleanup - Application server calls this method to force any cleanup on the ManagedConnection instance.
      13:33:51,442 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@2c7ac5
      13:33:51,443 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      13:33:51,444 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@1a9310
      13:33:51,445 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      13:33:51,516 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK
      13:33:51,517 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK


      ------------ Execution 6 ----------------
      13:34:14,499 INFO [STDOUT] TRELLIX: CONNECTION_FACTORY_IMPL: getConnection()
      13:34:14,500 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Returns a matched connection from the candidate set of connections.
      13:34:14,502 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_FACTORY_IMPL: matchManagedConnections - Yoopppppppieeeeeeeeeeeee
      13:34:14,504 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@1a9310
      13:34:14,506 INFO [STDOUT] TRELLIX: XAResourceImpl: START XAResource: com.whatever.ra.Trellix.XAResourceImpl@1a9310 with XID: XidImpl [FormatId=257, GlobalId=rtest.whatever.com//5, BranchQual=1]
      13:34:14,509 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getConnection - Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance.
      13:34:14,510 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : public constructor
      13:34:14,512 INFO [STDOUT] TRELLIX: CONNECTION_IMPL : close()
      13:34:14,514 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - closes the ManagedConnection com.whatever.ra.Trellix.ManagedConnectionImpl@ec42e0
      13:34:14,515 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - Sends the closing event to all connection managers...
      13:34:14,519 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL : close() - CONNECTION_CLOSED sent to the listener: org.jboss.resource.connectionmanager.XATxConnectionManager$XAConnectionEventListener@ad093c
      13:34:14,522 INFO [STDOUT] TRELLIX: MANAGED_CONNECTION_IMPL: getXAResource - Returns an javax.transaction.xa.XAresource instance. com.whatever.ra.Trellix.XAResourceImpl@1a9310
      13:34:14,523 INFO [STDOUT] TRELLIX: XAResourceImpl : END
      13:34:14,604 INFO [STDOUT] TRELLIX: XAResourceImpl : ROLLBACK





      So, here is the strange thing: during execution1, there is no managed connection in the pool, so the ManagedConnectionFactory will create one.
      During execution2, the managed connection is found in the pool and used. Here, the cleanup isn't called, so, for the execution3, a new managed connection is created, which is fair. And here comes the part I can't understand: in the execution4, there is a piece of code which is executed BEFORE getConnection(). Who creates this new managed connection and why is it enlisted into my transaction context by the transaction manager? Because my isSameRM() always returns false, there will be two branches in the transaction , but this can be solved with a proper implementation of isSameRM(). The question about the additional managed connection stands though.

      Any clues on this?
      Thanks
      Radu