Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.infodesire.infobit.hibernate
Interface SessionProvider

All Known Implementing Classes:
  BaseSessionProvider

public interface SessionProvider

implementors shall deliver hibernate session on demand.

Version:
  $Revision: 1.4 $
Author:
  konstantin

Method Summary
`net.sf.hibernate.Session` | `getSession()` provide hibernate session out of factory
`void` | `init(java.util.Properties properties)` initialize factory with properties
`void` | `returnCloseSession(net.sf.hibernate.Session sess)` return session back and close it.
`void` | `returnSession(net.sf.hibernate.Session sess)` put session back.
`void` | `rollback()` rollback active transaction if any.

Method Detail

### getSession

    public net.sf.hibernate.Session getSession()
                                        throws net.sf.hibernate.HibernateException

  provide hibernate session out of factory

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

### rollback

    public void rollback()
                  throws net.sf.hibernate.HibernateException

  rollback active transaction if any. shall be called in case whe something went wrong before closing and returning session.

  Throws:
    `net.sf.hibernate.HibernateException` - Description of Exception

### returnSession

    public void returnSession(net.sf.hibernate.Session sess)
                       throws net.sf.hibernate.HibernateException

  put session back. session may be flushed on behalf of implementing class

  Parameters:
    `sess` - Description of Parameter
  Throws:
    `net.sf.hibernate.HibernateException` - Description of Exception

### returnCloseSession

    public void returnCloseSession(net.sf.hibernate.Session sess)
                            throws net.sf.hibernate.HibernateException

  return session back and close it. this method shall be called in case of errors to kill tainted session.

  Parameters:
    `sess` - Description of Parameter
  Throws:
    `net.sf.hibernate.HibernateException` - Description of Exception

### init

    public void init(java.util.Properties properties)
              throws InfobitException

  initialize factory with properties

  Parameters:
    `properties` - Description of Parameter
  Throws:
    `InfobitException` - Description of Exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Information Desire GmbH. All Rights Reserved.