com.bankframe.ei.ldap
Class LDAPServerContextFactory

java.lang.Object
  extended bycom.bankframe.ei.ldap.LDAPServerContextFactory

public class LDAPServerContextFactory
extends java.lang.Object

This factory class creates LDAPServerContext instances associated with the specified alias. The alias name corresponds to a number of entries in the BankframeResource.properties that all begin with a prefix identical to the alias name. These entries identify how to establish the connection to the LDAP server. See LDAPServerContext for an explanation of these entries. In order to simplify the defintion of these settings, settings common to all LDAP contexts can be specified with the prefix: ldap.default, e.g.
ldap.default.java.naming.provider.url=ldap://hostname:389>
ldap.default.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.default.java.naming.security.authentication=simple
These default settings will be inherited by all LDAP contexts. Any settings that are redefined in a specific context will override the default settings.

Author:
etu

Field Summary
static java.lang.String DEFAULT_LDAP_PROPERTIES
           
 
Method Summary
static LDAPServerContext getServerContext(java.lang.String alias)
          This method gets the LDAP server context specified by the alias.
static LDAPServerContext getServerContext(java.lang.String alias, java.lang.String securityPrincipal, java.lang.Object securityCredentials)
          This method gets the LDAP server context specified by the alias.
static void releaseServerContext(LDAPServerContext ctx)
          This method releases a server context
static void releaseServerContext(java.lang.String alias)
          This method releases an LDAP server context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LDAP_PROPERTIES

public static final java.lang.String DEFAULT_LDAP_PROPERTIES
See Also:
Constant Field Values
Method Detail

getServerContext

public static LDAPServerContext getServerContext(java.lang.String alias)
                                          throws javax.naming.NamingException
This method gets the LDAP server context specified by the alias. When finished with the context call releaseServerContext()

Parameters:
alias - Name of the server context to retrieve
Throws:
javax.naming.NamingException

getServerContext

public static LDAPServerContext getServerContext(java.lang.String alias,
                                                 java.lang.String securityPrincipal,
                                                 java.lang.Object securityCredentials)
                                          throws javax.naming.NamingException
This method gets the LDAP server context specified by the alias. When finished with the context call releaseServerContext()

Parameters:
alias - Name of the server context to retrieve
securityPrincipal - user to authenticate as
securityCredentials - user credentials
Throws:
javax.naming.NamingException

releaseServerContext

public static void releaseServerContext(LDAPServerContext ctx)
This method releases a server context


releaseServerContext

public static void releaseServerContext(java.lang.String alias)
This method releases an LDAP server context. Every call to getServerContext() should have a corresponding call to releaseServerContext().

Parameters:
alias - Name of the server context to release


Copyright © 2004 Siebel Systems, Inc. All rights reserved.