if (!isNullOrEmpty(dataSourceJndiUrl)) {
ROOT_LOGGER.debugf("Using datasource [%s] for embedded EntityManagerFactory.", dataSourceJndiUrl);
properties.put("javax.persistence.jtaDataSource", dataSourceJndiUrl);
}
properties.put(AvailableSettings.JTA_PLATFORM, new JBossAppServerJtaPlatform());
Module entityModule = this.storeConfig.getEntityModule();
if (entityModule != null) {
Thread.currentThread().setContextClassLoader(entityModule.getClassLoader());