org.apache.camel.util.jndi
Class CamelInitialContextFactory

java.lang.Object
  extended by org.apache.camel.util.jndi.CamelInitialContextFactory
All Implemented Interfaces:
InitialContextFactory
Direct Known Subclasses:
CamelSingletonInitialContextFactory

public class CamelInitialContextFactory
extends Object
implements InitialContextFactory

A factory of the Camel InitialContext which allows a Map to be used to create a JNDI context.

This implementation is prototype based, by creating a new context on each call to getInitialContext(java.util.Hashtable).

Version:

Constructor Summary
CamelInitialContextFactory()
           
 
Method Summary
 Context getInitialContext(Hashtable<?,?> environment)
          Creates a new context with the given environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelInitialContextFactory

public CamelInitialContextFactory()
Method Detail

getInitialContext

public Context getInitialContext(Hashtable<?,?> environment)
                          throws NamingException
Creates a new context with the given environment.

Specified by:
getInitialContext in interface InitialContextFactory
Parameters:
environment - the environment, must not be null
Returns:
the created context.
Throws:
NamingException - is thrown if creation failed.


Apache Camel