Example usage for javax.persistence PersistenceContextType EXTENDED

List of usage examples for javax.persistence PersistenceContextType EXTENDED

Introduction

In this page you can find the example usage for javax.persistence PersistenceContextType EXTENDED.

Prototype

PersistenceContextType EXTENDED

To view the source code for javax.persistence PersistenceContextType EXTENDED.

Click Source Link

Document

Extended persistence context

Usage

From source file:org.sloth.persistence.impl.EntityManagerDao.java

/**
 * Sets the {@code EntityManager} fpr this class. Will be autowired.
 * /*from  w ww. java  2s .  co m*/
 * @param em
 *            the {@code EntityManager}
 */
@PersistenceContext(type = PersistenceContextType.EXTENDED)
public void setEntityManager(EntityManager em) {
    logger.info("Setting EntityManager");
    this.entityManager = em;
}

From source file:com.impetus.kundera.persistence.EntityManagerFactoryImpl.java

@Override
public final EntityManager createEntityManager() {
    // For Application managed persistence context, type is always EXTENDED
    return new EntityManagerImpl(this, transactionType, PersistenceContextType.EXTENDED);
}

From source file:com.impetus.kundera.persistence.EntityManagerFactoryImpl.java

@Override
public final EntityManager createEntityManager(Map map) {
    // For Application managed persistence context, type is always EXTENDED
    return new EntityManagerImpl(this, map, transactionType, PersistenceContextType.EXTENDED);
}