diff --git a/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java b/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java
index <HASH>..<HASH> 100644
--- a/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java
+++ b/person-directory-impl/src/main/java/org/apereo/services/persondir/support/ldap/LdaptivePersonAttributeDao.java
@@ -52,7 +52,7 @@ import java.util.Map;
  * @author Marvin S. Addison
  * @since 4.0.0
  */
-public class LdaptivePersonAttributeDao extends AbstractQueryPersonAttributeDao<FilterTemplate> {
+public class LdaptivePersonAttributeDao extends AbstractQueryPersonAttributeDao<FilterTemplate> implements AutoCloseable {
 
     /**
      * Logger instance.
@@ -270,4 +270,11 @@ public class LdaptivePersonAttributeDao extends AbstractQueryPersonAttributeDao<
         logger.debug("Converted ldap DN entry [{}] to attribute map {}", entry.getDn(), attributeMap.toString());
         return attributeMap;
     }
+
+    @Override
+    public void close() {
+         if (connectionFactory != null) {
+             connectionFactory.close();
+         }
+    }
 }
allow ldap dao to close connection factories