Top Fields
org.hibernate.cfg

public Interface SessionEventSettings

Known Direct Subinterfaces
org.hibernate.cfg.AvailableSettings
Imports
java.util.function.Supplier, org.hibernate.Interceptor

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
INTERCEPTOR

Specifies an org.hibernate.Interceptor implementation associated with the org.hibernate.SessionFactory and propagated to each Session created from the SessionFactory.

public static final String
LOG_SESSION_METRICS

Controls whether session metrics should be logged for any session in which statistics are being collected.

public static final String
SESSION_SCOPED_INTERCEPTOR

Specifies an org.hibernate.Interceptor implementation associated with the org.hibernate.SessionFactory and propagated to each Session created from the SessionFactory.

Field Detail

AUTO_SESSION_EVENTS_LISTENERback to summary
public static final String AUTO_SESSION_EVENTS_LISTENER

Defines a default org.hibernate.SessionEventListener to be applied to newly-opened org.hibernate.Sessions.

INTERCEPTORback to summary
public static final String INTERCEPTOR

Specifies an org.hibernate.Interceptor implementation associated with the org.hibernate.SessionFactory and propagated to each Session created from the SessionFactory. Either:

  • an instance of Interceptor,
  • a Class representing a class that implements Interceptor, 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 the SessionFactory to which it is applied; the same instance will be passed to each Session. If there should be a separate instance of Interceptor for each Session, use SESSION_SCOPED_INTERCEPTOR instead.

Since
5.0
See Also
org.hibernate.boot.SessionFactoryBuilder#applyInterceptor(Interceptor)
LOG_SESSION_METRICSback to summary
public 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.

SESSION_SCOPED_INTERCEPTORback to summary
public static final String SESSION_SCOPED_INTERCEPTOR

Specifies an org.hibernate.Interceptor implementation associated with the org.hibernate.SessionFactory and propagated to each Session created from the SessionFactory. Either:

  • a Class representing a class that implements Interceptor,
  • 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 every Session opened from the SessionFactory, but unlike INTERCEPTOR, a separate instance created for each Session.

Since
5.2
See Also
org.hibernate.boot.SessionFactoryBuilder#applyStatelessInterceptor(Class), org.hibernate.boot.SessionFactoryBuilder#applyStatelessInterceptor(Supplier)