| If there is a transaction bound session, will return it. Otherwise
returns a new session.
A transactional bound session is bounded to the transaction when calling
the CompassSession.beginTransaction() or if Compass tries to automatically join
an already running transaction (see next paragraph).
If creating a new session, will try to automatically join an existing
outer transaction. An outer transaction might be an already running Compass
local transaction, or an external transaciton (JTA or Spring for example). In
such cases, there is no need to perform any transaction managment code (begin
or commit/rollback transaction) or closing the opened session. Compass will also
bind the session to the same transaction if an outer transaction exists. Note, when
doing so, the mentioned code will have to always be excuted within an already running
transaction.
CompassSession The compass session throws: CompassException - |