org.apache.ws.util.jndi
Class XmlBeanJndiUtils

java.lang.Object
  extended byorg.apache.ws.util.jndi.JNDIUtils
      extended byorg.apache.ws.util.jndi.XmlBeanJndiUtils

public class XmlBeanJndiUtils
extends JNDIUtils

LOG-DONE JNDI Utiltiy methods for use with an XmlBean-generated JNDI-Config file. This class handles the initial setup of JNDI, it loads the JNDI config file and registers instances of services.

Author:
Sal Campana

Field Summary
static java.lang.String APACHE_INITIAL_CONTEXT_FACTORY
          Apache JNDI Initial Context Factory Prefix
static java.lang.String APACHE_URL_PKG_PREFIX
          Apache JNDI URL Package Prefix
static java.lang.String JNDI_CONFIG_FILENAME
          The file name of the jndi-config file.
 
Fields inherited from class org.apache.ws.util.jndi.JNDIUtils
JNDI_CONFIG
 
Constructor Summary
XmlBeanJndiUtils()
           
 
Method Summary
static javax.naming.Context initializeDir(java.lang.String configDir)
          Initializes JNDI from a directory tree which contains the jndi-config.xml files....
static javax.naming.Context initializeFile(java.lang.String configFilename)
          Initializes JNDI given a File name which will attempt to be loaded.
static javax.naming.Context initializeFromInputStream(java.io.InputStream inputStream)
          Initializes JNDI from a given InputStream to a jndi-config.xml file.
static javax.naming.Context initJNDI()
          Configure JNDI with the Apache Tomcat naming service classes and create the comp and env contexts
static void parseJNDIConfig(javax.naming.Context initContext, java.io.InputStream configInput)
          Called via parseJNDIConfig(InputStream)

Parse the given JNDI configuration and populate the JNDI registry using the parsed configuration

 
Methods inherited from class org.apache.ws.util.jndi.JNDIUtils
createSubcontexts, getJNDIConfigFileName, initializeDir, initializeFile, lookup, parseJNDIConfig, parseJNDIConfig, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APACHE_URL_PKG_PREFIX

public static final java.lang.String APACHE_URL_PKG_PREFIX
Apache JNDI URL Package Prefix

See Also:
Constant Field Values

APACHE_INITIAL_CONTEXT_FACTORY

public static final java.lang.String APACHE_INITIAL_CONTEXT_FACTORY
Apache JNDI Initial Context Factory Prefix

See Also:
Constant Field Values

JNDI_CONFIG_FILENAME

public static final java.lang.String JNDI_CONFIG_FILENAME
The file name of the jndi-config file.

See Also:
Constant Field Values
Constructor Detail

XmlBeanJndiUtils

public XmlBeanJndiUtils()
Method Detail

initJNDI

public static javax.naming.Context initJNDI()
                                     throws java.lang.Exception
Configure JNDI with the Apache Tomcat naming service classes and create the comp and env contexts

Returns:
The initial context
Throws:
java.lang.Exception

initializeDir

public static javax.naming.Context initializeDir(java.lang.String configDir)
                                          throws java.lang.Exception
Initializes JNDI from a directory tree which contains the jndi-config.xml files....

Parameters:
configDir -
Returns:
Throws:
java.lang.Exception

initializeFile

public static javax.naming.Context initializeFile(java.lang.String configFilename)
                                           throws java.lang.Exception
Initializes JNDI given a File name which will attempt to be loaded.

Parameters:
configFilename -
Returns:
Throws:
java.lang.Exception

initializeFromInputStream

public static javax.naming.Context initializeFromInputStream(java.io.InputStream inputStream)
                                                      throws java.lang.Exception
Initializes JNDI from a given InputStream to a jndi-config.xml file.

Parameters:
inputStream -
Returns:
JNDI Context
Throws:
java.lang.Exception

parseJNDIConfig

public static void parseJNDIConfig(javax.naming.Context initContext,
                                   java.io.InputStream configInput)
                            throws java.lang.Exception
Called via parseJNDIConfig(InputStream)

Parse the given JNDI configuration and populate the JNDI registry using the parsed configuration

Parameters:
configInput - The configuration stream to parse
Throws:
java.lang.Exception


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.