Example usage for org.springframework.instrument.classloading SimpleLoadTimeWeaver SimpleLoadTimeWeaver

List of usage examples for org.springframework.instrument.classloading SimpleLoadTimeWeaver SimpleLoadTimeWeaver

Introduction

In this page you can find the example usage for org.springframework.instrument.classloading SimpleLoadTimeWeaver SimpleLoadTimeWeaver.

Prototype

public SimpleLoadTimeWeaver() 

Source Link

Document

Create a new SimpleLoadTimeWeaver for the current context ClassLoader .

Usage

From source file:corner.orm.gae.GaeModule.java

public static EntityManagerFactory buildEntityManagerFactory(
        @Autobuild DatastorePersistenceProvider persistenceProvider) {
    LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
    entityManagerFactoryBean.setPersistenceProvider(persistenceProvider);
    Properties jpaProperties = new Properties();
    jpaProperties.put("datanucleus.NontransactionalRead", "true");
    jpaProperties.put("datanucleus.NontransactionalWrite", "true");
    jpaProperties.put("datanucleus.ConnectionURL", "appengine");
    jpaProperties.put("datanucleus.jpa.addClassTransformer", "false");
    entityManagerFactoryBean.setJpaProperties(jpaProperties);
    LoadTimeWeaver loadTimeWeaver = new SimpleLoadTimeWeaver();
    entityManagerFactoryBean.setLoadTimeWeaver(loadTimeWeaver);
    entityManagerFactoryBean.afterPropertiesSet();
    return entityManagerFactoryBean.getObject();
}