From 619d5d46a827a46b26ef2f71673e89d34b2cec05 Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Fri, 09 Oct 2009 01:02:11 +0000
Subject: [PATCH] - get rid of JE DatabaseException ruse and prepare for JE4 drop-in.

---
 opends/src/server/org/opends/server/backends/jeb/JECompressedSchema.java |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/JECompressedSchema.java b/opends/src/server/org/opends/server/backends/jeb/JECompressedSchema.java
index af4c396..b02101f 100644
--- a/opends/src/server/org/opends/server/backends/jeb/JECompressedSchema.java
+++ b/opends/src/server/org/opends/server/backends/jeb/JECompressedSchema.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2008 Sun Microsystems, Inc.
+ *      Copyright 2008-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.backends.jeb;
 
@@ -133,12 +133,15 @@
    * @param  environment  A reference to the database environment in which the
    *                      databases will be held.
    *
-   * @throws  DatabaseException  If a problem occurs while loading the
-   *                             compressed schema definitions from the
-   *                             database.
+   * @throws DatabaseException       If a database problem occurs while loading
+   *                                 the compressed schema definitions from the
+   *                                 database.
+   * @throws InitializationException If an error occurs while loading and
+   *                                 processing the compressed schema
+   *                                 definitions.
    */
   public JECompressedSchema(Environment environment)
-         throws DatabaseException
+         throws DatabaseException, InitializationException
   {
     this.environment = environment;
 
@@ -165,11 +168,14 @@
   /**
    * Loads the compressed schema information from the database.
    *
-   * @throws  DatabaseException  If a problem occurs while loading the
-   *                             definitions from the database.
+   * @throws DatabaseException       If a database error occurs while
+   *                                 loading the definitions from the
+   *                                 database.
+   * @throws InitializationException If an error occurs while loading
+   *                                 and processing the definitions.
    */
   private void load()
-          throws DatabaseException
+          throws DatabaseException, InitializationException
   {
     DatabaseConfig dbConfig = new DatabaseConfig();
 
@@ -242,7 +248,7 @@
 
       Message m =
            ERR_JEB_COMPSCHEMA_CANNOT_DECODE_OC_TOKEN.get(ae.getMessage());
-      throw new DatabaseException(m.toString(), ae);
+      throw new InitializationException(m, ae);
     }
     finally
     {
@@ -314,7 +320,7 @@
 
       Message m =
            ERR_JEB_COMPSCHEMA_CANNOT_DECODE_AD_TOKEN.get(ae.getMessage());
-      throw new DatabaseException(m.toString(), ae);
+      throw new InitializationException(m, ae);
     }
     finally
     {

--
Gitblit v1.10.0