Package org.springframework.orm.jpa.support

Examples of org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor


    given(factory.createEntityManager()).willReturn(manager);
    given(manager.getTransaction()).willReturn(tx);
    given(manager.isOpen()).willReturn(true);

    bean = new EntityManagerHoldingBean();
    PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
      @Override
      protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {
        return factory;
      }
    };
    pabpp.postProcessPropertyValues(null, null, bean, "bean");

    assertTrue(TransactionSynchronizationManager.getResourceMap().isEmpty());
    assertFalse(TransactionSynchronizationManager.isSynchronizationActive());
  }
View Full Code Here


        return new MongoExceptionTranslator();
    }

    @Bean
    public PersistenceAnnotationBeanPostProcessor persistenceAnnotationBeanPostProcessor() {
        return new PersistenceAnnotationBeanPostProcessor();
    }
View Full Code Here

  @Bean
  public PersistenceAnnotationBeanPostProcessor persistenceAnnotationBeanPostProcessor()
  {
    // Needed to support the @PersistenceContext annotation for Spring
    return new PersistenceAnnotationBeanPostProcessor();
  }
View Full Code Here

TOP

Related Classes of org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor

Copyright © 2018 www.massapicom. 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.