org.sape.carboncontrib.jndi
Class InitialContextHelper
java.lang.Object
org.sape.carboncontrib.jndi.InitialContextHelper
- public class InitialContextHelper
- extends Object
A helper class to create InitialContext objects required for JNDI lookups.
Constructor Summary |
InitialContextHelper()
Private Constructor: Don't let anyone instantiate this class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
providerConfigName
private static final String providerConfigName
- See Also:
- Constant Field Values
InitialContextHelper
public InitialContextHelper()
- Private Constructor: Don't let anyone instantiate this class
getInitialContext
public static InitialContext getInitialContext(User user,
String jndiProviderName)
throws NamingException
- Gets the JNDI initial context for the supplied provider name.
- Parameters:
user
- the user object for authenticating to the JNDI service. If this
parameter is null, the behaviour is determined by the JNDI service provider.jndiProviderName
- the name of the JNDI provider whose services are
desired. If this parameter is set to null, you will get an InitialContext
to the JNDI provider on the local server. JNDI provider names and their
properties are stored in /jndi/jndi-providers.xml.
- Returns:
- InitialContext the initial context
- Throws:
InvalidConfigurationException
- if any required configration value
does not exist.
NamingException
- if there is any NamingException
Copyright 2003 Sapient Corporation. All Rights Reserved.