public void close() throws IllegalStateException, RepositoryException
   {
      checkIfOpened();
      if (LOG.isDebugEnabled())
         this.closedByCallStack = new Exception("The connection has been closed by the following call stack");

      try
      {
         closeStatements();

         if (!readOnly && getDbConnectionTotalUsed() == 1
            && dbConnection.getTransactionIsolation() > Connection.TRANSACTION_READ_COMMITTED)
         {
            dbConnection.rollback();
         }

         if (release() == 0)
         {
            // We don't close the connection as long as it is used
            dbConnection.close();
         }
      }
      catch (SQLException e)
      {
         throw new RepositoryException(e);
      }
   }
public void close ( ) throws IllegalStateException , RepositoryException { checkIfOpened ( ) ; if ( LOG . isDebugEnabled ( ) ) this . closedByCallStack = new Exception ( "The connection has been closed by the following call stack" ) ; try { closeStatements ( ) ; if ( ! readOnly && getDbConnectionTotalUsed ( ) == 1 && dbConnection . getTransactionIsolation ( ) > Connection . TRANSACTION_READ_COMMITTED ) { dbConnection . rollback ( ) ; } if ( release ( ) == 0 ) { dbConnection . close ( ) ; } } catch ( SQLException e ) { throw new RepositoryException ( e ) ; } }
{@inheritDoc}