org.tynamo.jpa.internal
Class JPAEntityManagerSourceImpl

java.lang.Object
  extended by org.tynamo.jpa.internal.JPAEntityManagerSourceImpl
All Implemented Interfaces:
EventListener, org.apache.tapestry5.ioc.services.RegistryShutdownListener, JPAEntityManagerSource

public class JPAEntityManagerSourceImpl
extends Object
implements JPAEntityManagerSource, org.apache.tapestry5.ioc.services.RegistryShutdownListener


Constructor Summary
JPAEntityManagerSourceImpl(org.slf4j.Logger logger, String persistenceUnit)
           
 
Method Summary
 javax.persistence.EntityManager create()
          Creates a new session using the EntityManagerFactory created at service startup.
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
          Returns the EntityManagerFactory from which JPA entity managers are created.
 void registryDidShutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAEntityManagerSourceImpl

public JPAEntityManagerSourceImpl(org.slf4j.Logger logger,
                                  String persistenceUnit)
Method Detail

create

public javax.persistence.EntityManager create()
Description copied from interface: JPAEntityManagerSource
Creates a new session using the EntityManagerFactory created at service startup.

Specified by:
create in interface JPAEntityManagerSource

getEntityManagerFactory

public javax.persistence.EntityManagerFactory getEntityManagerFactory()
Description copied from interface: JPAEntityManagerSource
Returns the EntityManagerFactory from which JPA entity managers are created.

Specified by:
getEntityManagerFactory in interface JPAEntityManagerSource

registryDidShutdown

public void registryDidShutdown()
Specified by:
registryDidShutdown in interface org.apache.tapestry5.ioc.services.RegistryShutdownListener


Copyright © 2009-2010. All Rights Reserved.