ServiceTarget serviceTarget = phaseContext.getServiceTarget();
ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
if (dataSources.getDataSource() != null && dataSources.getDataSource().size() > 0) {
for (int i = 0; i < dataSources.getDataSource().size(); i++) {
DataSource ds = (DataSource)dataSources.getDataSource().get(i);
if (ds.isEnabled() && ds.getDriver() != null) {
try {
final String jndiName = cleanupJavaContext(ds.getJndiName());
LocalDataSourceService lds = new LocalDataSourceService(jndiName);
lds.getDataSourceConfigInjector().inject(buildDataSource(ds));
final String dsName = ds.getJndiName();
final PathAddress addr = getDataSourceAddress(dsName, deploymentUnit, false);
installManagementModel(ds, deploymentUnit, addr);
startDataSource(lds, jndiName, ds.getDriver(), serviceTarget, verificationHandler,
getRegistration(false, deploymentUnit), getResource(dsName, false, deploymentUnit), dsName);
} catch (Exception e) {
throw ConnectorMessages.MESSAGES.exceptionDeployingDatasource(e, ds.getJndiName());
}
} else {
ConnectorLogger.DS_DEPLOYER_LOGGER.debugf("Ignoring: %s", ds.getJndiName());
}
}
}
if (dataSources.getXaDataSource() != null && dataSources.getXaDataSource().size() > 0) {