org.ow2.carol.jndi.spi
Class VirtualJNDIContextFactory

java.lang.Object
  extended by org.ow2.carol.jndi.spi.VirtualJNDIContextFactory
All Implemented Interfaces:
InitialContextFactory

public class VirtualJNDIContextFactory
extends Object
implements InitialContextFactory

Context factory that uses VirtualJNDILookup for JNDI lookups.

Author:
S. Ali Tokmen

Field Summary
static String PARENT_INITIAL_CONTEXT_FACTORY
          Parent InitialContextFactory environment variable.
 
Constructor Summary
VirtualJNDIContextFactory()
           
 
Method Summary
 Context getInitialContext(Hashtable<?,?> env)
          Creates a context using the parent context factory and maps it with a new VirtualJNDILookup instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARENT_INITIAL_CONTEXT_FACTORY

public static final String PARENT_INITIAL_CONTEXT_FACTORY
Parent InitialContextFactory environment variable.

Constructor Detail

VirtualJNDIContextFactory

public VirtualJNDIContextFactory()
Method Detail

getInitialContext

public Context getInitialContext(Hashtable<?,?> env)
                          throws NamingException
Creates a context using the parent context factory and maps it with a new VirtualJNDILookup instance.

Specified by:
getInitialContext in interface InitialContextFactory
Parameters:
env - The possibly null environment specifying information to be used in the creation of the initial context.
Returns:
A non-null initial context object that implements the Context interface.
Throws:
NamingException - If cannot create an initial context.


Copyright © 2010 OW2 Consortium. All Rights Reserved.