}
}
if (dataSources.getXaDataSource() != null && dataSources.getXaDataSource().size() > 0) {
for (int i = 0; i < dataSources.getXaDataSource().size(); i++) {
XaDataSource xads = (XaDataSource)dataSources.getXaDataSource().get(i);
if (xads.isEnabled() && xads.getDriver() != null) {
try {
String jndiName = Util.cleanJndiName(xads.getJndiName(), xads.isUseJavaContext());
XaDataSourceService xds = new XaDataSourceService(jndiName);
xds.getDataSourceConfigInjector().inject(buildXaDataSource(xads));
final String dsName = xads.getJndiName();
final PathAddress addr = getDataSourceAddress(dsName, deploymentUnit, true);
installManagementModel(xads, deploymentUnit, addr);
startDataSource(xds, jndiName, xads.getDriver(), serviceTarget, verificationHandler,
getRegistration(true, deploymentUnit), getResource(dsName, true, deploymentUnit), dsName);
} catch (Exception e) {
throw ConnectorMessages.MESSAGES.exceptionDeployingDatasource(e, xads.getJndiName());
}
} else {
ConnectorLogger.DS_DEPLOYER_LOGGER.debugf("Ignoring %s", xads.getJndiName());
}
}
}
}