public class ApacheDSContextListener extends Object implements javax.servlet.ServletContextListener
The following environment variables are supported:
The server is both self-contained and light-weight.
| Constructor and Description |
|---|
ApacheDSContextListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent evt)
Shutdown ApacheDS embedded.
|
void |
contextInitialized(javax.servlet.ServletContextEvent evt)
Startup ApacheDS embedded.
|
protected int |
getLdapPort() |
protected String |
getLdifFile() |
protected String |
getPartitionDN() |
protected List<org.apache.directory.api.ldap.model.ldif.LdifEntry> |
loadLdif(InputStream in,
boolean verifyEntries)
Loads an LDIF from an input stream and adds the entries it contains to
the server.
|
protected void |
verify(org.apache.directory.api.ldap.model.ldif.LdifEntry entry)
Verifies that an entry exists in the directory with the
specified attributes.
|
protected String getPartitionDN()
protected int getLdapPort()
protected String getLdifFile()
protected List<org.apache.directory.api.ldap.model.ldif.LdifEntry> loadLdif(InputStream in, boolean verifyEntries) throws Exception
in - the input stream containing the LDIF entries to loadverifyEntries - whether or not all entry additions are checked
to see if they were in fact correctly added to the serverNamingException - of the load failsExceptionprotected void verify(org.apache.directory.api.ldap.model.ldif.LdifEntry entry)
throws Exception
entry - the entry to verifyNamingException - if there are problems accessing the entryExceptionpublic void contextInitialized(javax.servlet.ServletContextEvent evt)
If you get an error message in the logs like: "The value 'inetOrgPerson' is incorrect, it hasn't been added" Don't stress, it's an ApacheDS bug: https://issues.apache.org/jira/browse/DIRSERVER-1253
Also if you see an error message like this: "OID for name 'monitorcontext' was not found within the OID registry" It's an Apache LDAP Studio bug.
contextInitialized in interface javax.servlet.ServletContextListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent evt)
contextDestroyed in interface javax.servlet.ServletContextListenerCopyright © 2022 Atlassian. All rights reserved.