public class CamelSingletonInitialContextFactory extends CamelInitialContextFactory
InitialContext which allows a Map to be used to create a
JNDI context.
This implementation is singleton based, by creating a new context once, and reusing it on each call to
getInitialContext(java.util.Hashtable).| Constructor and Description |
|---|
CamelSingletonInitialContextFactory() |
| Modifier and Type | Method and Description |
|---|---|
Context |
getInitialContext(Hashtable<?,?> environment)
Gets or creates the context with the given environment.
|
public Context getInitialContext(Hashtable<?,?> environment) throws NamingException
getInitialContext in interface InitialContextFactorygetInitialContext in class CamelInitialContextFactoryenvironment - the environment, must not be nullNamingException - is thrown if creation failed.Apache Camel