org.tynamo.jpa
Class JPACoreModule

java.lang.Object
  extended by org.tynamo.jpa.JPACoreModule

@Marker(value=JPACore.class)
public class JPACoreModule
extends Object

Defines core services that support initialization of Hibernate and access to the Hibernate EntityManager.


Constructor Summary
JPACoreModule()
           
 
Method Summary
static void bind(org.apache.tapestry5.ioc.ServiceBinder binder)
           
static javax.persistence.EntityManager buildEntityManager(JPATransactionManager transactionManager, org.apache.tapestry5.ioc.services.PropertyShadowBuilder propertyShadowBuilder)
           
static JPAEntityManagerSource buildJPAEntityManagerSource(org.slf4j.Logger logger, String persistenceUnit, org.apache.tapestry5.ioc.services.RegistryShutdownHub hub)
           
static JPATransactionManager buildJPATransactionManager(JPAEntityManagerSource sessionSource, org.apache.tapestry5.ioc.services.PerthreadManager perthreadManager)
          The transaction manager manages transaction on a per-thread/per-request basis.
static void contributeFactoryDefaults(org.apache.tapestry5.ioc.MappedConfiguration<String,String> configuration)
           
static void contributeRegistryStartup(org.apache.tapestry5.ioc.OrderedConfiguration<Runnable> configuration, boolean earlyStartup, JPAEntityManagerSource entityManagerSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPACoreModule

public JPACoreModule()
Method Detail

bind

public static void bind(org.apache.tapestry5.ioc.ServiceBinder binder)

contributeFactoryDefaults

public static void contributeFactoryDefaults(org.apache.tapestry5.ioc.MappedConfiguration<String,String> configuration)

contributeRegistryStartup

public static void contributeRegistryStartup(org.apache.tapestry5.ioc.OrderedConfiguration<Runnable> configuration,
                                             @Symbol(value="tapestry.jpa.early-startup")
                                             boolean earlyStartup,
                                             JPAEntityManagerSource entityManagerSource)

buildJPATransactionManager

@Scope(value="perthread")
public static JPATransactionManager buildJPATransactionManager(JPAEntityManagerSource sessionSource,
                                                                     org.apache.tapestry5.ioc.services.PerthreadManager perthreadManager)
The transaction manager manages transaction on a per-thread/per-request basis. Any active transaction will be rolled back at thread cleanup time. The thread is cleaned up automatically in a Tapestry web application.


buildEntityManager

public static javax.persistence.EntityManager buildEntityManager(JPATransactionManager transactionManager,
                                                                 org.apache.tapestry5.ioc.services.PropertyShadowBuilder propertyShadowBuilder)

buildJPAEntityManagerSource

public static JPAEntityManagerSource buildJPAEntityManagerSource(org.slf4j.Logger logger,
                                                                 @Inject@Symbol(value="tapestry.jpa.persistence-unit")
                                                                 String persistenceUnit,
                                                                 org.apache.tapestry5.ioc.services.RegistryShutdownHub hub)


Copyright © 2009-2010. All Rights Reserved.