net.sf.spif.naming
Class InitialContextFactory

java.lang.Object
  |
  +--net.sf.spif.naming.InitialContextFactory

public class InitialContextFactory
extends java.lang.Object

A vm-wide actory for initial contextes which remembers its configuration.

Version:
$Id: InitialContextFactory.java,v 1.2 2003/02/05 22:15:46 bratseth Exp $
Author:
Jon S Bratseth

Constructor Summary
InitialContextFactory()
           
 
Method Summary
static javax.naming.InitialContext getContext()
           
static void initialize(java.util.Properties lookupProperties)
          Initializes the initial context factory.
static void printContext()
          Prints the entire context tree to standard out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitialContextFactory

public InitialContextFactory()
Method Detail

initialize

public static void initialize(java.util.Properties lookupProperties)

Initializes the initial context factory. This must be done at startup in any vm using this factory.

The property file must at least contain java.naming.factory.initial= java.naming.provider.url= Maybe more, depending on server.

Parameters:
lookupProperties - a file containing the properties required to look up the initial context of the naming server used

getContext

public static javax.naming.InitialContext getContext()
Returns:
the initial context
Throws:
ConfigurationException - if an initial context could not be created

printContext

public static void printContext()
Prints the entire context tree to standard out



Spif 1.01 (2003-04-03). http://spif.sf.net