public class BitronixInitialContextFactory extends Object implements InitialContextFactory
InitialContextFactory that allows lookup of transaction manager
and registered resources.
The easiest way to use this provider is to create a jndi.properties file
in your classpath with this content:
java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactoryAlternatively, you can create a
InitialContext object with an environment
pointing to this class:
Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "bitronix.tm.jndi.BitronixInitialContextFactory"); Context ctx = new InitialContext(env);
The transaction manager can be looked up at the standard URL java:comp/UserTransaction
while resources can be looked up using their unique name as set in
ResourceBean.getUniqueName().
BitronixContext| Constructor and Description |
|---|
BitronixInitialContextFactory() |
public Context getInitialContext(Hashtable<?,?> hashtable) throws NamingException
getInitialContext in interface InitialContextFactoryNamingExceptionCopyright © 2006-2016 Bitronix Software. All Rights Reserved.