Package org.springframework.orm.jpa

Examples of org.springframework.orm.jpa.JpaTransactionManager.afterPropertiesSet()


        return emfBean.getObject();
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    /**
     * @deprecated use {@link #getEntityManagerFactory()} to get hold of factory and create an entity manager using the factory.
View Full Code Here


        assertNull(comp.getEntityManagerFactory());
        assertNull(comp.getTransactionManager());

        EntityManagerFactory fac = Persistence.createEntityManagerFactory("camel");
        JpaTransactionManager tm = new JpaTransactionManager(fac);
        tm.afterPropertiesSet();

        comp.setEntityManagerFactory(fac);
        comp.setTransactionManager(tm);

        assertSame(fac, comp.getEntityManagerFactory());
View Full Code Here

        return Persistence.createEntityManagerFactory(persistenceUnit, getEntityManagerProperties());
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    protected EntityManager createEntityManager() {
        return getEntityManagerFactory().createEntityManager();
View Full Code Here

    /**
     * Creates a new implementation from the given JPA factory and JPA template
     */
    public static JpaTemplateTransactionStrategy newInstance(EntityManagerFactory emf, JpaTemplate template) {
        JpaTransactionManager transactionManager = new JpaTransactionManager(emf);
        transactionManager.afterPropertiesSet();

        TransactionTemplate tranasctionTemplate = new TransactionTemplate(transactionManager);
        tranasctionTemplate.afterPropertiesSet();

        return new JpaTemplateTransactionStrategy(template, tranasctionTemplate);
View Full Code Here

        return Persistence.createEntityManagerFactory(persistenceUnit, getEntityManagerProperties());
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    protected EntityManager createEntityManager() {
        return getEntityManagerFactory().createEntityManager();
View Full Code Here

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

    @Bean
    public EntityManager entityManager(EntityManagerFactory entityManagerFactory) {
View Full Code Here

        return Persistence.createEntityManagerFactory(persistenceUnit, getEntityManagerProperties());
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    protected EntityManager createEntityManager() {
        return getEntityManagerFactory().createEntityManager();
View Full Code Here

        return emfBean.getObject();
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    protected EntityManager getEntityManager() {
        if (entityManager == null) {
View Full Code Here

        return Persistence.createEntityManagerFactory(persistenceUnit, getEntityManagerProperties());
    }

    protected PlatformTransactionManager createTransactionManager() {
        JpaTransactionManager tm = new JpaTransactionManager(getEntityManagerFactory());
        tm.afterPropertiesSet();
        return tm;
    }

    protected EntityManager createEntityManager() {
        return getEntityManagerFactory().createEntityManager();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.