Package org.hibernate.cfg
Interface SessionEventSettings
-
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface SessionEventSettings
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.static String
INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.static String
LOG_SESSION_METRICS
Controls whether session metrics should be logged for any session in which statistics are being collected.static String
SESSION_SCOPED_INTERCEPTOR
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.
-
-
-
Field Detail
-
LOG_SESSION_METRICS
static final String 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:
- Constant Field Values
- Default Value:
- Defined by
StatisticsSettings.GENERATE_STATISTICS
-
AUTO_SESSION_EVENTS_LISTENER
static final String AUTO_SESSION_EVENTS_LISTENER
Defines a defaultSessionEventListener
to be applied to newly-openedSession
s.- See Also:
- Constant Field Values
-
INTERCEPTOR
static final String 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:
SessionFactoryBuilder.applyInterceptor(Interceptor)
, Constant Field Values
- an instance of
-
SESSION_SCOPED_INTERCEPTOR
static final String 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
-
-