code: public final void rollback() throws IllegalStateException, RepositoryException
     {
        checkIfOpened();
        try
        {
           closeStatements();
  
           if (!readOnly)
           {
              try
              {
                 if (getDbConnectionTotalUsed() == 1)
                 {
                    // We don't roll back as long as it is used
                    dbConnection.rollback();
                 }
              }
              finally
              {
                 // rollback from the end
                 IOException e = null;
                 for (int p = valueChanges.size() - 1; p >= 0; p--)
                 {
                    try
                    {
                       valueChanges.get(p).rollback();
                    }
                    catch (IOException e1)
                    {
                       if (e == null)
                       {
                          e = e1;
                       }
                       else
                       {
                          LOG.error("Could not rollback value change", e1);
                       }
                    }
                 }
                 if (e != null)
                 {
                    throw e;
                 }
              }
           }
        }
        catch (SQLException e)
        {
           throw new RepositoryException(e);
        }
        catch (IOException e)
        {
           throw new RepositoryException(e);
        }
        finally
        {
           valueChanges.clear();
           try
           {
              if (release() == 0)
              {
                 // We don't close the connection as long as it is used
                 dbConnection.close();
              }
           }
           catch (SQLException e)
           {
              if (LOG.isWarnEnabled())
              {
                 LOG.warn("Could not close the connection", e);
              }
           }
        }
     }
docs: {@inheritDoc}