DataSourceDefinitionDescriptor dsd) {
// It is possible that JPA might call this method multiple times in a single deployment,
// when there are multiple PUs eg: one PU in each of war, ejb-jar. Make sure that
// DSD is bound to JNDI only when it is not already deployed.
if(!dsd.isDeployed()){
DataSourceDefinitionProxy proxy = habitat.getComponent(DataSourceDefinitionProxy.class);
ResourceNamingService resourceNamingService = habitat.getComponent(ResourceNamingService.class);
proxy.setDescriptor(dsd);
//String appName = application.getAppName();
String moduleName = null;
if(dsd.getName().startsWith(ConnectorConstants.JAVA_APP_SCOPE_PREFIX)){
dsd.setResourceId(appName);