Example usage for org.springframework.orm.jpa JpaTransactionManager setEntityManagerFactory

List of usage examples for org.springframework.orm.jpa JpaTransactionManager setEntityManagerFactory

Introduction

In this page you can find the example usage for org.springframework.orm.jpa JpaTransactionManager setEntityManagerFactory.

Prototype

public void setEntityManagerFactory(@Nullable EntityManagerFactory emf) 

Source Link

Document

Set the EntityManagerFactory that this instance should manage transactions for.

Usage

From source file:se.omegapoint.facepalm.client.config.DatabaseConfig.java

@Bean
public JpaTransactionManager transactionManager() {
    final JpaTransactionManager transactionManager = new JpaTransactionManager();
    transactionManager.setEntityManagerFactory(entityManagerFactory.getObject());
    return transactionManager;
}

From source file:com.javaetmoi.sample.config.InfrastructureConfig.java

@Bean
public JpaTransactionManager transactionManager() {
    JpaTransactionManager jpaTransactionManager = new JpaTransactionManager();
    jpaTransactionManager.setEntityManagerFactory(entityManagerFactory());
    return jpaTransactionManager;
}

From source file:io.cloudslang.schema.context.ScoreDatabaseContext.java

@Bean
JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
    JpaTransactionManager jpaTransactionManager = new JpaTransactionManager();
    jpaTransactionManager.setEntityManagerFactory(entityManagerFactory);
    return jpaTransactionManager;
}

From source file:com.greendot.db.jpa.configuration.JpaDatabaseConfiguration.java

@Bean
public PlatformTransactionManager transactionManager(final EntityManagerFactory entityManagerFactory) {

    final JpaTransactionManager transactionManager = new JpaTransactionManager();
    transactionManager.setEntityManagerFactory(entityManagerFactory);
    return transactionManager;
}

From source file:net.kenblair.scheduler.jpa.TestConfig.java

@Bean
public PlatformTransactionManager transactionManager() throws SQLException {
    final JpaTransactionManager txManager = new JpaTransactionManager();
    txManager.setEntityManagerFactory(entityManagerFactory());
    return txManager;
}

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.chevrier.legiondao.config.ConfigJpa.java

@Bean
public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
    JpaTransactionManager txManager = new JpaTransactionManager();
    txManager.setEntityManagerFactory(entityManagerFactory);
    return txManager;
}

From source file:com.github.djabry.platform.service.data.config.DAOConfig.java

@Bean
public PlatformTransactionManager transactionManager() {

    JpaTransactionManager tm = new JpaTransactionManager();

    tm.setEntityManagerFactory(this.entityManagerFactory().getObject());
    tm.setJpaDialect(new HibernateJpaDialect());

    return tm;//from   ww w .  j  av  a  2 s  . c  o  m

}

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:ch.javaee.basicMvc.config.StandaloneDataConfig.java

@Bean
public PlatformTransactionManager transactionManager() {

    JpaTransactionManager tm = new JpaTransactionManager();

    tm.setEntityManagerFactory(this.entityManagerFactory().getObject());

    return tm;//from ww w  .  jav  a 2 s .  co m

}