Example usage for org.hibernate.cfg AvailableSettings JTA_CACHE_TM

List of usage examples for org.hibernate.cfg AvailableSettings JTA_CACHE_TM

Introduction

In this page you can find the example usage for org.hibernate.cfg AvailableSettings JTA_CACHE_TM.

Prototype

String JTA_CACHE_TM

To view the source code for org.hibernate.cfg AvailableSettings JTA_CACHE_TM.

Click Source Link

Document

A configuration value key used to indicate that it is safe to cache javax.transaction.TransactionManager references.

Usage

From source file:org.everit.osgi.hibernate.adapter.HibernatePersistenceProvider.java

License:Open Source License

protected Map<?, ?> generateExtendedSettings(final Map<?, ?> map) {
    Map<Object, Object> result = null;
    if (map == null) {
        result = new ConcurrentHashMap<Object, Object>();
    } else {//from  www .j av  a  2s.  c om
        result = new ConcurrentHashMap<Object, Object>(map);
    }
    result.put("javax.persistence.validation.factory", getValidatorFactory());
    result.put(AvailableSettings.JTA_CACHE_TM, false);
    result.put(AvailableSettings.JTA_CACHE_UT, false);

    OsgiJtaPlatform osgiJtaPlatform = new OsgiJtaPlatform(transactionManagerTracker, userTransactionTracker);
    osgiJtaPlatform.configure(result);
    result.put(AvailableSettings.JTA_PLATFORM, osgiJtaPlatform);
    return result;
}