Skip to content

Commit

Permalink
[JBJCA-1334] Add DataSource to ManagementRepository only after deploy…
Browse files Browse the repository at this point in the history
…ed successfully (#581)
  • Loading branch information
gaol authored and Stefano Maestri committed Sep 29, 2016
1 parent bdea36e commit f14f147
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f14f147

Please sign in to comment.