Package org.hibernate.cfg
Interface SessionEventSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface SessionEventSettings
-
Field Summary
FieldsModifier 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
Deprecated, for removal: This API element is subject to removal in a future version.This setting is now ignored.static final String
Specifies anInterceptor
implementation associated with theSessionFactory
and propagated to eachSession
created from theSessionFactory
.
-
Field Details
-
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
-
LOG_SESSION_METRICS
Deprecated, for removal: This API element is subject to removal in a future version.This setting is now ignored. Enable the log categoryorg.hibernate.session.metrics
to automatically collect and log session-level metrics.- See Also:
-