bitronix.tm.jndi
Class BitronixInitialContextFactory

java.lang.Object
  extended by bitronix.tm.jndi.BitronixInitialContextFactory
All Implemented Interfaces:
InitialContextFactory

public class BitronixInitialContextFactory
extends Object
implements InitialContextFactory

Implementation of 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.BitronixInitialContextFactory
Alternatively, 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().

Author:
lorban
See Also:
BitronixContext

Constructor Summary
BitronixInitialContextFactory()
           
 
Method Summary
 Context getInitialContext(Hashtable hashtable)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitronixInitialContextFactory

public BitronixInitialContextFactory()
Method Detail

getInitialContext

public Context getInitialContext(Hashtable hashtable)
                          throws NamingException
Specified by:
getInitialContext in interface InitialContextFactory
Throws:
NamingException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2013 Bitronix Software. All Rights Reserved.