org.nanocontainer.persistence.hibernate.classic
Interface SessionProvider


public interface SessionProvider

implementors provide session session management.

Version:
$Revision: 2043 $
Author:
Konstantin Pribluda ( konstantin.pribluda[at]infodesire.com )

Method Summary
 void close()
          normal session close.
 void commit()
          commit transaction currently underway, and start new one ( as side effect hibernate session will be flushed )
 net.sf.hibernate.Session getSession()
          provide hibernate session out of factory create new one if necessary,
 void reset()
          reset and clean up everything.
 void rollback()
          rollback active transaction if any was started.
 

Method Detail

getSession

net.sf.hibernate.Session getSession()
                                    throws net.sf.hibernate.HibernateException
provide hibernate session out of factory create new one if necessary,

Returns:
The Session value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

commit

void commit()
            throws net.sf.hibernate.HibernateException
commit transaction currently underway, and start new one ( as side effect hibernate session will be flushed )

Throws:
net.sf.hibernate.HibernateException

rollback

void rollback()
              throws net.sf.hibernate.HibernateException
rollback active transaction if any was started. transaction will be reset

Throws:
net.sf.hibernate.HibernateException - if transaction can not be rolled back

close

void close()
           throws net.sf.hibernate.HibernateException
normal session close. commit transaction is any

Throws:
net.sf.hibernate.HibernateException

reset

void reset()
reset and clean up everything. shall be used is something went wrong ( for example you received hibernate exception )



Copyright 2003-2003-2006 Codehaus. All Rights Reserved.