Package org.hibernate.cfg
Interface SessionEventSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface SessionEventSettings
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefines a defaultSessionEventListenerto be applied to newly-openedSessions.static final StringSpecifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory.static final StringControls whether session metrics should be logged for any session in which statistics are being collected.static final StringSpecifies anInterceptorimplementation associated with theSessionFactoryand propagated to eachSessioncreated from theSessionFactory.
-
Field Details
-
LOG_SESSION_METRICS
Controls whether session metrics should be logged for any session in which statistics are being collected.By default, logging of session metrics is disabled unless
StatisticsSettings.GENERATE_STATISTICSis enabled.- See Also:
- Default Value:
- Defined by
StatisticsSettings.GENERATE_STATISTICS
-
AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListenerto be applied to newly-openedSessions.- See Also:
-
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:
- an instance of
-
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
-