Search in sources :

Example 1 with JtaPlatformResolver

use of org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver in project hibernate-orm by hibernate.

the class JtaPlatformResolverInitiator method initiateService.

@Override
public JtaPlatformResolver initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
    final Object setting = configurationValues.get(AvailableSettings.JTA_PLATFORM_RESOLVER);
    final JtaPlatformResolver resolver = registry.getService(StrategySelector.class).resolveStrategy(JtaPlatformResolver.class, setting);
    if (resolver == null) {
        log.debugf("No JtaPlatformResolver was specified, using default [%s]", StandardJtaPlatformResolver.class.getName());
        return StandardJtaPlatformResolver.INSTANCE;
    }
    return resolver;
}
Also used : JtaPlatformResolver(org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver) StrategySelector(org.hibernate.boot.registry.selector.spi.StrategySelector)

Aggregations

StrategySelector (org.hibernate.boot.registry.selector.spi.StrategySelector)1 JtaPlatformResolver (org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformResolver)1