directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1163237 - in /directory/apacheds/branches/apacheds-jdbm: core/src/main/java/org/apache/directory/server/core/subtree/ jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
Date Tue, 30 Aug 2011 14:39:16 GMT
Author: elecharny
Date: Tue Aug 30 14:39:15 2011
New Revision: 1163237

URL: http://svn.apache.org/viewvc?rev=1163237&view=rev
Log:
applied patch from Selcuk for DIRSERVER-1649

Modified:
    directory/apacheds/branches/apacheds-jdbm/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/apacheds-jdbm/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java

Modified: directory/apacheds/branches/apacheds-jdbm/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-jdbm/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=1163237&r1=1163236&r2=1163237&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-jdbm/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-jdbm/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Tue Aug 30 14:39:15 2011
@@ -245,13 +245,22 @@ public class SubentryInterceptor extends
 
                     subentryCache.addSubentry( subentryDn, newSubentry );
                 }
-
-                subentries.close();
             }
             catch ( Exception e )
             {
                 throw new LdapOperationException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
         }
     }
 
@@ -377,6 +386,17 @@ public class SubentryInterceptor extends
         {
             throw new LdapOtherException( e.getMessage(), e );
         }
+        finally
+        {
+            try
+            {
+                subentries.close();
+            }
+            catch ( Exception e )
+            {
+                LOG.error( I18n.err( I18n.ERR_168 ), e );
+            }
+        }
     }
 
 
@@ -1093,6 +1113,17 @@ public class SubentryInterceptor extends
             {
                 throw new LdapOperationErrorException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
 
             // search for all selected entries by the new SS and add references to subentry
             subentry = subentryCache.getSubentry( dn );
@@ -1124,6 +1155,17 @@ public class SubentryInterceptor extends
             {
                 throw new LdapOperationErrorException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
         }
         else
         {
@@ -1232,13 +1274,22 @@ public class SubentryInterceptor extends
                             oldDn, newName, subentry, candidate ) ) );
                     }
                 }
-
-                subentries.close();
             }
             catch ( Exception e )
             {
                 throw new LdapOperationException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
         }
         else
         {
@@ -1323,13 +1374,22 @@ public class SubentryInterceptor extends
                             oldDn, newName, subentry, candidate ) ) );
                     }
                 }
-
-                subentries.close();
             }
             catch ( Exception e )
             {
                 throw new LdapOperationException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
         }
         else
         {
@@ -1404,13 +1464,22 @@ public class SubentryInterceptor extends
                             oldDn, newName, subentry, candidate ) ) );
                     }
                 }
-
-                subentries.close();
             }
             catch ( Exception e )
             {
                 throw new LdapOperationException( e.getMessage(), e );
             }
+            finally
+            {
+                try
+                {
+                    subentries.close();
+                }
+                catch ( Exception e )
+                {
+                    LOG.error( I18n.err( I18n.ERR_168 ), e );
+                }
+            }
         }
         else
         {

Modified: directory/apacheds/branches/apacheds-jdbm/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-jdbm/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java?rev=1163237&r1=1163236&r2=1163237&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-jdbm/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
(original)
+++ directory/apacheds/branches/apacheds-jdbm/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
Tue Aug 30 14:39:15 2011
@@ -477,4 +477,26 @@ class DupsCursor<K,V> extends AbstractTu
         super.close( cause );
         containerCursor.close( cause );
     }
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void close() throws Exception
+    {
+        super.close();
+        containerCursor.close();            
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void close( Exception cause ) throws Exception
+    {
+        super.close( cause );
+        containerCursor.close( cause );
+    }
+
 }



Mime
View raw message