org.wso2.solutions.identity.persistence
Class HibernateConfig

java.lang.Object
  extended by org.wso2.solutions.identity.persistence.HibernateConfig

public class HibernateConfig
extends java.lang.Object

This loads the hibernate configuration and manages hibernate sessions.


Field Summary
 java.lang.ThreadLocal SESSION
           
 
Constructor Summary
HibernateConfig(java.lang.String fileName)
           
 
Method Summary
 void closeSession()
          Closes the hibernate session of the current thread.
 org.hibernate.Session getCurrentSession()
          Accessor to obtain the session of the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION

public final java.lang.ThreadLocal SESSION
Constructor Detail

HibernateConfig

public HibernateConfig(java.lang.String fileName)
                throws IdentityProviderException
Throws:
IdentityProviderException
Method Detail

getCurrentSession

public org.hibernate.Session getCurrentSession()
Accessor to obtain the session of the current thread.

Returns:
Returns an org.hibernate.Session instace which is the hibernate session pertaining to this thread.

closeSession

public void closeSession()
Closes the hibernate session of the current thread.