org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl Java Examples
The following examples show how to use
org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FastBootMetadataBuilder.java From quarkus with Apache License 2.0 | 6 votes |
private static void applyTransactionProperties(PersistenceUnitDescriptor persistenceUnit, Map<String, Object> configurationValues) { PersistenceUnitTransactionType transactionType = PersistenceUnitTransactionTypeHelper .interpretTransactionType(configurationValues.get(JPA_TRANSACTION_TYPE)); if (transactionType == null) { transactionType = persistenceUnit.getTransactionType(); } if (transactionType == null) { // is it more appropriate to have this be based on bootstrap entry point (EE vs SE)? transactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL; } boolean hasTransactionStrategy = configurationValues.containsKey(TRANSACTION_COORDINATOR_STRATEGY); if (hasTransactionStrategy) { LOG.overridingTransactionStrategyDangerous(TRANSACTION_COORDINATOR_STRATEGY); } else { if (transactionType == PersistenceUnitTransactionType.JTA) { configurationValues.put(TRANSACTION_COORDINATOR_STRATEGY, JtaTransactionCoordinatorBuilderImpl.class); } else if (transactionType == PersistenceUnitTransactionType.RESOURCE_LOCAL) { configurationValues.put(TRANSACTION_COORDINATOR_STRATEGY, JdbcResourceLocalTransactionCoordinatorBuilderImpl.class); } } }
Example #2
Source File: EntityManagerFactoryBuilderImpl.java From lams with GNU General Public License v2.0 | 6 votes |
private void applyTransactionProperties(StandardServiceRegistryBuilder ssrBuilder) { PersistenceUnitTransactionType txnType = PersistenceUnitTransactionTypeHelper.interpretTransactionType( configurationValues.get( JPA_TRANSACTION_TYPE ) ); if ( txnType == null ) { txnType = persistenceUnit.getTransactionType(); } if ( txnType == null ) { // is it more appropriate to have this be based on bootstrap entry point (EE vs SE)? txnType = PersistenceUnitTransactionType.RESOURCE_LOCAL; } boolean hasTxStrategy = configurationValues.containsKey( TRANSACTION_COORDINATOR_STRATEGY ); if ( hasTxStrategy ) { LOG.overridingTransactionStrategyDangerous( TRANSACTION_COORDINATOR_STRATEGY ); } else { if ( txnType == PersistenceUnitTransactionType.JTA ) { ssrBuilder.applySetting( TRANSACTION_COORDINATOR_STRATEGY, JtaTransactionCoordinatorBuilderImpl.class ); } else if ( txnType == PersistenceUnitTransactionType.RESOURCE_LOCAL ) { ssrBuilder.applySetting( TRANSACTION_COORDINATOR_STRATEGY, JdbcResourceLocalTransactionCoordinatorBuilderImpl.class ); } } }
Example #3
Source File: QuarkusStrategySelectorBuilder.java From quarkus with Apache License 2.0 | 5 votes |
private static void addTransactionCoordinatorBuilders(StrategySelectorImpl strategySelector) { strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, JdbcResourceLocalTransactionCoordinatorBuilderImpl.SHORT_NAME, JdbcResourceLocalTransactionCoordinatorBuilderImpl.class); strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, JtaTransactionCoordinatorBuilderImpl.SHORT_NAME, JtaTransactionCoordinatorBuilderImpl.class); }
Example #4
Source File: TransactionCoordinatorBuilderInitiator.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public TransactionCoordinatorBuilder initiateService(Map configurationValues, ServiceRegistryImplementor registry) { return registry.getService( StrategySelector.class ).resolveDefaultableStrategy( TransactionCoordinatorBuilder.class, determineStrategySelection( configurationValues ), JdbcResourceLocalTransactionCoordinatorBuilderImpl.INSTANCE ); }
Example #5
Source File: StrategySelectorBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
private void addTransactionCoordinatorBuilders(StrategySelectorImpl strategySelector) { strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, JdbcResourceLocalTransactionCoordinatorBuilderImpl.SHORT_NAME, JdbcResourceLocalTransactionCoordinatorBuilderImpl.class ); strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, JtaTransactionCoordinatorBuilderImpl.SHORT_NAME, JtaTransactionCoordinatorBuilderImpl.class ); // add the legacy TransactionFactory impl names... strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, "org.hibernate.transaction.JDBCTransactionFactory", JdbcResourceLocalTransactionCoordinatorBuilderImpl.class ); strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, "org.hibernate.transaction.JTATransactionFactory", JtaTransactionCoordinatorBuilderImpl.class ); strategySelector.registerStrategyImplementor( TransactionCoordinatorBuilder.class, "org.hibernate.transaction.CMTTransactionFactory", JtaTransactionCoordinatorBuilderImpl.class ); }