com.silverpeas.jndi
Class SimpleMemoryContextFactory
java.lang.Object
com.silverpeas.jndi.SimpleMemoryContextFactory
- All Implemented Interfaces:
- InitialContextFactory
public class SimpleMemoryContextFactory
- extends Object
- implements InitialContextFactory
A factory of a naming context that uses the memory as dictionary of objects. Useful to tests
objets using JNDI to get dependencies.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMemoryContextFactory
public SimpleMemoryContextFactory()
setUpAsInitialContext
public static void setUpAsInitialContext()
- Sets up this class as the default JNDI initial context factory. Useful if some tests uses
another JNDI intial context factory.
tearDownAsInitialContext
public static void tearDownAsInitialContext()
- Reverts to the previous JNDI initial context factory. This method has to be invoked if the
setUpAsInitialContext method was invoked previously.
getInitialContext
public Context getInitialContext(Hashtable<?,?> environment)
throws NamingException
- Specified by:
getInitialContext
in interface InitialContextFactory
- Throws:
NamingException
Copyright © 2016 Silverpeas. All Rights Reserved.