public class SpringSessionContext extends ObjectSE implements CurrentSessionContext
Session
を提供するために Spring の SessionFactoryUtils
に委譲する Hibernate 3.1 の CurrentSessionContext
インターフェースの実装。この CurrentSessionContext 実装は、"hibernate.current_session_context_class" プロパティを介してカスタム SessionFactory セットアップで指定することもでき、このクラスの完全修飾名を値として指定できます。
コンストラクターと説明 |
---|
SpringSessionContext(SessionFactoryImplementor sessionFactory) 指定された Hibernate SessionFactory の新しい SpringSessionContext を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
Session | currentSession() 現在のスレッドの Spring 管理セッションがある場合は、それを取得します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public SpringSessionContext(SessionFactoryImplementor sessionFactory)
sessionFactory
- 現在のセッションを提供する SessionFactorypublic Session currentSession() throws HibernateException
CurrentSessionContext
の currentSession
HibernateException