com.sptci.ldap
Class LdapResourceFactory
java.lang.Object
com.sptci.ldap.LdapResourceFactory
- All Implemented Interfaces:
- ObjectFactory
public class LdapResourceFactory
- extends Object
- implements ObjectFactory
This class is intended for use by a J2EE container. This is an
implementation a custom resource factory as defined in
The Apache Tomcat JNDI Resources How-To. Other J2EE containers should
be able to use this class to define an LDAP initial directory context, and
while the specific implementation details may vary, this class should be
portable.
When defining this resource, use these values to set establish
connection properties:
- url -- Identifies the scheme (ldap:// or ldaps://), hostname and
port
- basedn -- The base Distinguished Name used for both groups
and user lookups
- username -- The DN of the object to use when
binding to the directory
- password -- The password for the object
identified in the username attribute
If neither username nor password properties
are defined, then anonymous bind is attempted. No other LDAPv3
authentication methods are attempted. Certificate-based authentication is
not implemented, either.
- Version:
- $Id: LdapResourceFactory.java 4553 2008-12-24 10:34:16Z rakesh $
- Author:
- Jerry Busser
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LdapResourceFactory
public LdapResourceFactory()
getObjectInstance
public Object getObjectInstance(Object obj,
Name ctxName,
Context nameCtx,
Hashtable environment)
throws NamingException
- Specified by:
getObjectInstance in interface ObjectFactory
- Throws:
NamingException
getBasedn
public String getBasedn()
setBasedn
public void setBasedn(String basedn)
getPassword
public String getPassword()
setPassword
public void setPassword(String password)
getUrl
public String getUrl()
setUrl
public void setUrl(String url)
getUsername
public String getUsername()
setUsername
public void setUsername(String username)