Package org.apache.camel.support.jndi
Class CamelInitialContextFactory
- java.lang.Object
-
- org.apache.camel.support.jndi.CamelInitialContextFactory
-
- All Implemented Interfaces:
InitialContextFactory
- Direct Known Subclasses:
CamelSingletonInitialContextFactory
public class CamelInitialContextFactory extends Object implements InitialContextFactory
A factory of the CamelInitialContext
which allows aMap
to be used to create a JNDI context. This implementation is prototype based, by creating a new context on each call togetInitialContext(java.util.Hashtable)
.
-
-
Constructor Summary
Constructors Constructor Description CamelInitialContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Context
getInitialContext(Hashtable<?,?> environment)
Creates a new context with the given environment.
-
-
-
Method Detail
-
getInitialContext
public Context getInitialContext(Hashtable<?,?> environment) throws NamingException
Creates a new context with the given environment.- Specified by:
getInitialContext
in interfaceInitialContextFactory
- Parameters:
environment
- the environment, must not be null- Returns:
- the created context.
- Throws:
NamingException
- is thrown if creation failed.
-
-