return;
log.tracef("Processing datasource deployement: %s", datasources);
if (module == null)
throw new DeploymentUnitProcessingException("Failed to get module attachment for deployment: " + context.getName());
try {
if (deploymentName.indexOf("local") != -1) {
// Local datasources
List<DataSource> dss = datasources.getDataSource();
if (dss != null && dss.size() > 0) {
AS7Deployer deployer = new AS7Deployer(jndiStrategy.getValue(), module.getClassLoader(), log);
String uniqueJdbcLocalId = deploymentName;
String uniqueJdbcXAId = null;
deployer.setTransactionManager(getTransactionManager());
deployer.setMetadataRepository(mdr.getValue());
deployer.doDeploy(new URL("file://DataSourceDeployment"), deploymentName, uniqueJdbcLocalId,
uniqueJdbcXAId, datasources, module.getClassLoader());
}
} else {
// XA datasources
List<XaDataSource> xadss = datasources.getXaDataSource();
if (xadss != null && xadss.size() > 0) {
AS7Deployer deployer = new AS7Deployer(jndiStrategy.getValue(), module.getClassLoader(), log);
String uniqueJdbcLocalId = null;
String uniqueJdbcXAId = deploymentName;
deployer.setTransactionManager(getTransactionManager());
deployer.setMetadataRepository(mdr.getValue());
deployer.doDeploy(new URL("file://DataSourceDeployment"), deploymentName, uniqueJdbcLocalId,
uniqueJdbcXAId, datasources, module.getClassLoader());
}
}
} catch (Throwable t) {
throw new DeploymentUnitProcessingException(t);
}
}