org.apache.tapestry5.hibernate
Class HibernateCoreModule
java.lang.Object
org.apache.tapestry5.hibernate.HibernateCoreModule
@Marker(value=HibernateCore.class)
public class HibernateCoreModule
- extends Object
Defines core services that support initialization of Hibernate and access to the Hibernate Session
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateCoreModule
public HibernateCoreModule()
bind
public static void bind(ServiceBinder binder)
contributeFactoryDefaults
public static void contributeFactoryDefaults(MappedConfiguration<String,String> configuration)
contributeRegistryStartup
public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration,
@Symbol(value="tapestry.hibernate.early-startup")
boolean earlyStartup,
HibernateSessionSource sessionSource)
buildHibernateEntityPackageManager
public static HibernateEntityPackageManager buildHibernateEntityPackageManager(Collection<String> packageNames)
buildHibernateSessionManager
@Scope(value="perthread")
public static HibernateSessionManager buildHibernateSessionManager(HibernateSessionSource sessionSource,
PerthreadManager perthreadManager)
- The session manager manages sessions 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.
buildSession
public static org.hibernate.Session buildSession(HibernateSessionManager sessionManager,
PropertyShadowBuilder propertyShadowBuilder)
contributeHibernateSessionSource
public static void contributeHibernateSessionSource(OrderedConfiguration<HibernateConfigurer> config,
@Local
HibernateConfigurer defaultHibernateConfigurer)
- Adds the following configurers:
- Default
- performs default hibernate configuration
- PackageName
- loads entities by package name
Copyright © 2003-2012 The Apache Software Foundation.