protected TransactionFactory buildServiceInstance(Map configurationValues, ServiceRegistryImplementor registry) {
final Object strategy = configurationValues.get( Environment.TRANSACTION_STRATEGY );
//Hibernate EntityManager sets to JdbcTransactionFactory when RESOURCE_LOCAL is used
if ( strategy == null || JdbcTransactionFactory.class.getName().equals(strategy) ) {
log.usingDefaultTransactionFactory();
return new JTATransactionManagerTransactionFactory();
}
return TransactionFactoryInitiator.INSTANCE.initiateService(configurationValues, registry);
}