Skip to content

Commit

Permalink
Name the pool for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 1, 2023
1 parent cffbed1 commit 4f8edfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ public ConnectionManagerFactory(TransactionIntegration transactionIntegration, C
this.ccm = ccm;
}

public TxConnectionManager createConnectionManager(ManagedConnectionFactory mcf) {
public TxConnectionManager createConnectionManager(String id, ManagedConnectionFactory mcf) {
Pool pool = new PoolFactory()
.create(PoolStrategy.POOL_BY_CRI,
mcf,
new PoolConfiguration(),
false,
false,
ManagedConnectionPoolFactory.DEFAULT_IMPLEMENTATION);
pool.setName("pool-" + id);
return new org.jboss.jca.core.connectionmanager.ConnectionManagerFactory()
.createTransactional(
TransactionSupport.TransactionSupportLevel.XATransaction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public IronJacamarContainer createContainer(String id, String kind) {
} catch (ResourceException re) {
throw new DeploymentException("Cannot deploy resource adapter", re);
}
TxConnectionManager connectionManager = connectionManagerFactory.createConnectionManager(managedConnectionFactory);
TxConnectionManager connectionManager = connectionManagerFactory.createConnectionManager(id, managedConnectionFactory);
return new IronJacamarContainer(resourceAdapterFactory, resourceAdapter, managedConnectionFactory,
connectionManager);
}
Expand Down

0 comments on commit 4f8edfe

Please sign in to comment.