List of usage examples for org.springframework.orm.jpa JpaTransactionManager JpaTransactionManager
public JpaTransactionManager()
From source file:org.ngrinder.infra.config.DatabaseConfig.java
/** * Create the transactionManager.//w w w. j a va 2 s . c o m * * @return {@link JpaTransactionManager} */ @Bean public JpaTransactionManager transactionManager() { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(emf().getObject()); transactionManager.setDataSource(dataSource()); return transactionManager; }
From source file:com.chevrier.legiondao.config.ConfigJpa.java
@Bean public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory); return txManager; }
From source file:ca.n4dev.dev.worktime.config.SpringHibernateJPAConfig.java
@Bean public JpaTransactionManager transactionManager() { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); return transactionManager; }
From source file:de.hska.ld.core.config.PersistenceConfig.java
@Bean public PlatformTransactionManager transactionManager() throws SQLException { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory().getObject()); return txManager; }
From source file:au.com.shawware.sandbox.persistence.JPAConfiguration.java
/** * Defines the transaction manager factory to use. * //w ww . j av a 2s. co m * @return the transaction manager factory bean * * @throws SQLException error creating the bean */ @Bean public PlatformTransactionManager transactionManager() throws SQLException { final JpaTransactionManager mgr = new JpaTransactionManager(); mgr.setEntityManagerFactory(entityManagerFactory()); return mgr; }
From source file:com.alliander.osgp.adapter.protocol.oslp.application.config.OslpPersistenceConfig.java
/** * Method for creating the Transaction Manager. * * @return JpaTransactionManager//from w ww . j a v a2s . co m * @throws ClassNotFoundException * when class not found */ @Bean public JpaTransactionManager transactionManager() throws ProtocolAdapterException { final JpaTransactionManager transactionManager = new JpaTransactionManager(); try { transactionManager.setEntityManagerFactory(this.oslpEntityManagerFactory().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:org.thingsplode.server.JpaConfig.java
@Bean(name = "transactionManager") public PlatformTransactionManager transactionManager() throws PropertyVetoException, SQLException { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory()); return txManager; }
From source file:com.musala.configuration.RssAplicationConfiguration.java
@Bean public PlatformTransactionManager transactionManager() throws SQLException { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory()); return txManager; }
From source file:com.devnexus.ting.config.PersistenceConfig.java
@Bean public PlatformTransactionManager transactionManager() { JpaTransactionManager txManager = new JpaTransactionManager(); txManager.setEntityManagerFactory(entityManagerFactory().getObject()); return txManager; }
From source file:com.invariantproperties.project.student.config.TestPersistenceJpaConfig.java
@Bean public PlatformTransactionManager transactionManager() { JpaTransactionManager tm = new JpaTransactionManager(); try {/*from w w w. ja va 2s .c o m*/ tm.setEntityManagerFactory(this.entityManagerFactory().getObject()); } catch (ClassNotFoundException e) { // TODO: log. } return tm; }