List of usage examples for org.springframework.orm.jpa JpaTransactionManager JpaTransactionManager
public JpaTransactionManager()
From source file:se.ivankrizsan.messagecowboy.PersistenceConfiguration.java
/** * JPA transaction manager bean./* www . jav a2 s . c o m*/ * * @param inEntityManagerFactory Supplied by container using the JPA entity * manager factory bean defined above. */ @Bean public PlatformTransactionManager transactionManager(final EntityManagerFactory inEntityManagerFactory) { JpaTransactionManager theTransactionManager = new JpaTransactionManager(); theTransactionManager.setEntityManagerFactory(inEntityManagerFactory); return theTransactionManager; }
From source file:com.example.DBConfig.java
@Bean public JpaTransactionManager transactionManager() { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); return transactionManager; }
From source file:mg.jerytodik.business.config.JeryTodikConfig.java
@Bean public JpaTransactionManager transactionManager() { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactoryBean().getObject()); return transactionManager; }
From source file:br.eti.danielcamargo.backend.common.config.context.CoreConfig.java
@Bean public PlatformTransactionManager transactionManager() throws PropertyVetoException { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); return transactionManager; }
From source file:es.galvarez.rest.config.SpringConfiguration.java
@Bean(name = "transactionManager") public PlatformTransactionManager annotationDrivenTransactionManager() { return new JpaTransactionManager(); }
From source file:com.alliander.osgp.core.db.api.application.config.OsgpCoreDbApiPersistenceConfig.java
/** * Method for creating the Transaction Manager. * * @return JpaTransactionManager//from w ww .ja va 2s .c o m * @throws ClassNotFoundException * when class not found */ @Bean public JpaTransactionManager osgpCoreDbApiTransactionManager() throws CoreDbApiException { final JpaTransactionManager transactionManager = new JpaTransactionManager(); try { transactionManager.setEntityManagerFactory(this.osgpCoreDbApiEntityManagerFactory().getObject()); transactionManager.setTransactionSynchronization(JpaTransactionManager.SYNCHRONIZATION_ALWAYS); } catch (final ClassNotFoundException e) { final String msg = "Error in creating transaction manager bean"; LOGGER.error(msg, e); throw new CoreDbApiException(msg, e); } return transactionManager; }
From source file:br.com.valecard.config.MainConfig.java
@Bean public PlatformTransactionManager transactionManager() { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory()); return txManager; }
From source file:org.osgp.adapter.protocol.dlms.application.config.DlmsPersistenceConfig.java
/** * Method for creating the Transaction Manager. * * @return JpaTransactionManager// www . j av a 2 s . c om * @throws ClassNotFoundException * when class not found */ @Bean public JpaTransactionManager transactionManager() throws ProtocolAdapterException { final JpaTransactionManager transactionManager = new JpaTransactionManager(); try { transactionManager.setEntityManagerFactory(this.dlmsEntityManagerFactory().getObject()); transactionManager.setTransactionSynchronization(JpaTransactionManager.SYNCHRONIZATION_ALWAYS); } catch (final ClassNotFoundException e) { final String msg = "Error in creating transaction manager bean"; LOGGER.error(msg, e); throw new ProtocolAdapterException(msg, e); } return transactionManager; }
From source file:com.springsource.html5expense.config.ComponentConfig.java
@Bean public PlatformTransactionManager transactionManager() { final JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); Map<String, String> jpaProperties = new HashMap<String, String>(); jpaProperties.put("transactionTimeout", "43200"); transactionManager.setJpaPropertyMap(jpaProperties); return transactionManager; }
From source file:com.alliander.osgp.core.db.api.iec61850.application.config.Iec61850OsgpCoreDbApiPersistenceConfig.java
/** * Method for creating the Transaction Manager. * * @return JpaTransactionManager/*w w w . ja v a 2 s .co m*/ * @throws ClassNotFoundException * when class not found */ @Bean public JpaTransactionManager iec61850OsgpCoreDbApiTransactionManager() throws Iec61850CoreDbApiException { final JpaTransactionManager transactionManager = new JpaTransactionManager(); try { transactionManager .setEntityManagerFactory(this.iec61850OsgpCoreDbApiEntityManagerFactory().getObject()); transactionManager.setTransactionSynchronization(JpaTransactionManager.SYNCHRONIZATION_ALWAYS); } catch (final ClassNotFoundException e) { final String msg = "Error in creating transaction manager bean"; LOGGER.error(msg, e); throw new Iec61850CoreDbApiException(msg, e); } return transactionManager; }