mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
04.24.2008 f67af7588ba1f7827bc6ff907729d14bf39a19f6
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -30,7 +30,6 @@
import java.io.IOException;
import java.io.File;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.Lock;
import java.io.FileInputStream;
import java.io.FilenameFilter;
@@ -733,15 +732,6 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   e.getMessageObject());
    }
    finally
    {
      ec.sharedLock.unlock();
@@ -758,7 +748,7 @@
   */
  @Override()
  public void addEntry(Entry entry, AddOperation addOperation)
      throws DirectoryException
      throws DirectoryException, CanceledOperationException
  {
    writerBegin();
    DN entryDN = entry.getDN();
@@ -788,15 +778,6 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   e.getMessageObject());
    }
    finally
    {
      ec.sharedLock.unlock();
@@ -811,7 +792,7 @@
   */
  @Override()
  public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
      throws DirectoryException
      throws DirectoryException, CanceledOperationException
  {
    writerBegin();
@@ -840,15 +821,6 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   e.getMessageObject());
    }
    finally
    {
      ec.sharedLock.unlock();
@@ -863,7 +835,7 @@
   */
  @Override()
  public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
      throws DirectoryException
      throws DirectoryException, CanceledOperationException
  {
    writerBegin();
@@ -894,15 +866,6 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   e.getMessageObject());
    }
    finally
    {
      ec.sharedLock.unlock();
@@ -944,19 +907,9 @@
                                   msg);
    }
    Lock containerLock = currentContainer.sharedLock;
    currentContainer.sharedLock.lock();
    try
    {
      containerLock.lock();
      if(currentContainer.getNumSubordinates(currentDN, true) >
         currentContainer.getSubtreeDeleteBatchSize())
      {
        containerLock.unlock();
        containerLock = currentContainer.exclusiveLock;
        containerLock.lock();
      }
      currentContainer.renameEntry(currentDN, entry, modifyDNOperation);
    }
    catch (DatabaseException e)
@@ -967,18 +920,9 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   e.getMessageObject());
    }
    finally
    {
      containerLock.unlock();
      currentContainer.sharedLock.unlock();
      writerEnd();
    }
  }
@@ -990,7 +934,7 @@
   */
  @Override()
  public void search(SearchOperation searchOperation)
      throws DirectoryException
      throws DirectoryException, CanceledOperationException
  {
    readerBegin();
@@ -1019,16 +963,6 @@
      }
      throw createDirectoryException(e);
    }
    catch (JebException e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      Message message = ERR_JEB_DATABASE_EXCEPTION.get(e.getMessage());
      throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
                                   message);
    }
    finally
    {
      ec.sharedLock.unlock();