Package org.hibernate.cfg
Interface SessionEventSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface SessionEventSettings
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.static final String
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.static final String
Controls whether session metrics should be logged for any session in which statistics are being collected.static final String
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created 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_STATISTICS
is enabled.- See Also:
- Default Value:
- Defined by
StatisticsSettings.GENERATE_STATISTICS
-
AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.- See Also:
-
INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
. Either:- an instance of
Interceptor
, - a
Class
representing a class that implementsInterceptor
, or - the name of a class that implements
Interceptor
.
This setting identifies an
Interceptor
which is effectively a singleton across all the sessions opened from theSessionFactory
to which it is applied; the same instance will be passed to eachSession
. If there should be a separate instance ofInterceptor
for eachSession
, useSESSION_SCOPED_INTERCEPTOR
instead.- Since:
- 5.0
- See Also:
- an instance of
-
SESSION_SCOPED_INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
. Either:- a
Class
representing a class that implementsInterceptor
, - the name of a class that implements
Interceptor
, or - an instance of
Supplier
used to obtain the interceptor.
Note that this setting cannot specify an
Interceptor
instance.This setting identifies an
Interceptor
implementation that is to be applied to everySession
opened from theSessionFactory
, but unlikeINTERCEPTOR
, a separate instance created for eachSession
. - a
-