org.meta2project.model
Interface Session

All Known Implementing Classes:
BoxSession, DBSession, DebugSession, DerbySession, FastSession, HSQLDBSession

public interface Session

Ontobox session. A session is a long life cycle object. For example, the session can be created during initialization of a web application, and this session can be closed before the web application is terminated. Any ontobox session must be closed by calling the close method.

Author:
Anton Malykh

Method Summary
 void close()
          Close the ontobox session.
 Box getBox()
           
 BoxListenerManager getListenerManager()
           
 Connection openConnection()
          Open an autocommit connection for the ontobox session.
 Connection openTransaction()
          Open a transaction connection for the ontobox session.
 

Method Detail

openConnection

Connection openConnection()
Open an autocommit connection for the ontobox session. An autocommit connection writes down all changes on ontobase without rollback ability. A connection must be closed after using.

Returns:
new autocommin connection
See Also:
Connection.close()

openTransaction

Connection openTransaction()
Open a transaction connection for the ontobox session. During closing a transaction connection it can be commited or can be rolled back. A connection must be closed after using (the Connection.close method for commit or the Connection.closeRollback method for rollback).

Returns:
new transaction connection
See Also:
Connection.close(), Connection.closeRollback()

getListenerManager

BoxListenerManager getListenerManager()

getBox

Box getBox()

close

void close()
Close the ontobox session.