diff --git a/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java b/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java index 80ad43fd4..7c1469e68 100644 --- a/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java +++ b/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractDsDeployer.java @@ -319,6 +319,9 @@ protected CommonDeployment createObjectsAndInjectValue(URL url, jndis.add(jndiName); cms.add(cm[0]); mgts.add(mgtDataSource); + + log.debugf("Adding management datasource: %s", mgtDataSource); + getManagementRepository().getDataSources().add(mgtDataSource); } catch (Throwable t) { @@ -379,6 +382,9 @@ protected CommonDeployment createObjectsAndInjectValue(URL url, cms.add(cm[0]); recoveryModules.add(recovery[0]); mgts.add(mgtDataSource); + + log.debugf("Adding management datasource: %s", mgtDataSource); + getManagementRepository().getDataSources().add(mgtDataSource); } catch (Throwable t) { @@ -627,9 +633,6 @@ else if (ds.getSecurity().getSecurityDomain() != null) if (mcf instanceof Statistics) mgtDs.setStatistics(((Statistics)mcf).getStatistics()); - log.debugf("Adding management datasource: %s", mgtDs); - getManagementRepository().getDataSources().add(mgtDs); - // Flush strategy FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; if (ds.getPool() != null) @@ -915,9 +918,6 @@ else if (ds.getSecurity().getSecurityDomain() != null) if (mcf instanceof Statistics) mgtDs.setStatistics(((Statistics)mcf).getStatistics()); - log.debugf("Adding management datasource: %s", mgtDs); - getManagementRepository().getDataSources().add(mgtDs); - // Flush strategy FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; if (ds.getXaPool() != null)