diff options
author | Fraser Tweedale <ftweedal@redhat.com> | 2014-09-22 03:22:57 -0400 |
---|---|---|
committer | Fraser Tweedale <frase@frase.id.au> | 2015-04-13 00:06:40 -0400 |
commit | 1bfebdb6cc4385b5d83704a72f6eb9de78fded9b (patch) | |
tree | 10447055f45eca504a6ad55583ac61a8e23e22ac /base/server/cmscore/src/com/netscape/cmscore/base | |
parent | 57cee4807f690091d4e1d20e331d475405adff6e (diff) | |
download | pki-1bfebdb6cc4385b5d83704a72f6eb9de78fded9b.tar.gz pki-1bfebdb6cc4385b5d83704a72f6eb9de78fded9b.tar.xz pki-1bfebdb6cc4385b5d83704a72f6eb9de78fded9b.zip |
Monitor database for changes to LDAP profiles.
Use a persistent query to monitor the database for changes to LDAP
profiles, and update the contents of the ProfileSubsystem according
to the changes (Add/Modify/Delete) that occur.
The monitoring occurs within its own thread.
Diffstat (limited to 'base/server/cmscore/src/com/netscape/cmscore/base')
-rw-r--r-- | base/server/cmscore/src/com/netscape/cmscore/base/LDAPConfigStore.java | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/base/LDAPConfigStore.java b/base/server/cmscore/src/com/netscape/cmscore/base/LDAPConfigStore.java index 788ef6bc9..a9a6536f0 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/base/LDAPConfigStore.java +++ b/base/server/cmscore/src/com/netscape/cmscore/base/LDAPConfigStore.java @@ -75,39 +75,13 @@ public class LDAPConfigStore extends PropConfigStore implements IConfigStore { public LDAPConfigStore( ILdapConnFactory dbFactory, String dn, LDAPAttribute[] createAttrs, String attr - ) throws EBaseException { + ) { super(null); // top-level store without a name this.dbFactory = dbFactory; this.dn = dn; this.createAttrs = createAttrs; this.attr = attr; - - LDAPConnection conn = dbFactory.getConn(); - - String[] readAttrs = {attr}; - try { - LDAPEntry ldapEntry = conn.read(dn, readAttrs); - - Enumeration<String> vals = ldapEntry.getAttribute(attr).getStringValues(); - InputStream data = new ByteArrayInputStream(vals.nextElement().getBytes()); - load(data); - } catch (LDAPException e) { - // if there is no such object, we will create it on commit() - if (e.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT) { - throw new EBaseException( - "Error reading LDAPConfigStore '" - + dn + "': " + e.toString() - ); - } - } catch (IOException e) { - throw new EBaseException( - "Error reading LDAPConfigStore '" - + dn + "': " + e.toString() - ); - } finally { - dbFactory.returnConn(conn); - } } @Override |