From 4f8edfeeaaeb3b48cffeb8ebb1a5a025d38e6ae0 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Fri, 1 Sep 2023 17:29:18 -0300 Subject: [PATCH] Name the pool for debugging purposes --- .../ironjacamar/runtime/ConnectionManagerFactory.java | 3 ++- .../io/quarkiverse/ironjacamar/runtime/IronJacamarSupport.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/ConnectionManagerFactory.java b/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/ConnectionManagerFactory.java index 5769df0..db37780 100644 --- a/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/ConnectionManagerFactory.java +++ b/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/ConnectionManagerFactory.java @@ -28,7 +28,7 @@ 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, @@ -36,6 +36,7 @@ public TxConnectionManager createConnectionManager(ManagedConnectionFactory mcf) false, false, ManagedConnectionPoolFactory.DEFAULT_IMPLEMENTATION); + pool.setName("pool-" + id); return new org.jboss.jca.core.connectionmanager.ConnectionManagerFactory() .createTransactional( TransactionSupport.TransactionSupportLevel.XATransaction, diff --git a/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/IronJacamarSupport.java b/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/IronJacamarSupport.java index cc7c751..e246ebb 100644 --- a/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/IronJacamarSupport.java +++ b/runtime/src/main/java/io/quarkiverse/ironjacamar/runtime/IronJacamarSupport.java @@ -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); }