Package org.hibernate.cfg
Interface SessionEventSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interfaceSessionEventSettings
Field Summary
Fields Modifier and Type Field Description staticStringAUTO_SESSION_EVENTS_LISTENERDefines a defaultSessionEventListenerto be applied to newly-openedSessions.staticStringINTERCEPTORSpecifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory.staticStringLOG_SESSION_METRICSControls whethersession metrics should belogged for any session in which statistics are being collected.staticStringSESSION_SCOPED_INTERCEPTORSpecifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory.
Field Detail
LOG_SESSION_METRICS
static final String LOG_SESSION_METRICS
Controls whethersession metrics should belogged for any session in which statistics are being collected.By default, logging of session metrics is disabled unless
StatisticsSettings.GENERATE_STATISTICSis enabled.- See Also:
- Constant Field Values
- Default Value:
- Defined by
StatisticsSettings.GENERATE_STATISTICS
AUTO_SESSION_EVENTS_LISTENER
static final String AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListenerto be applied to newly-openedSessions.- See Also:
- Constant Field Values
INTERCEPTOR
static final String INTERCEPTOR
Specifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory. Either:- an instance of
Interceptor, - a
Classrepresenting a class that implementsInterceptor, or - the name of a class that implements
Interceptor.
This setting identifies an
Interceptorwhich is effectively a singleton across all the sessions opened from theSessionFactoryto which it is applied; the same instance will be passed to eachSession. If there should be a separate instance ofInterceptorfor eachSession, useSESSION_SCOPED_INTERCEPTORinstead.- Since:
- 5.0
- See Also:
SessionFactoryBuilder.applyInterceptor(Interceptor),Constant Field Values
- an instance of
SESSION_SCOPED_INTERCEPTOR
static final String SESSION_SCOPED_INTERCEPTOR
Specifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory. Either:- a
Classrepresenting a class that implementsInterceptor, - the name of a class that implements
Interceptor, or - an instance of
Supplierused to obtain the interceptor.
Note that this setting cannot specify an
Interceptorinstance.This setting identifies an
Interceptorimplementation that is to be applied to everySessionopened from theSessionFactory, but unlikeINTERCEPTOR, a separate instance created for eachSession.- a