package org.jboss.cache;

import javax.naming.InitialContext;
import javax.transaction.TransactionManager;

/**
 * Default implementation. Uses JNDI to lookup TransactionManager.
 *
 * @author Bela Ban, Aug 26 2003
 * @version $Id: JBossTransactionManagerLookup.java,v 1.2.2.5 2004/09/23 18:42:24 bwang00 Exp $
 */
public class JBossTransactionManagerLookup implements TransactionManagerLookup {

   public JBossTransactionManagerLookup() {
   }

   public TransactionManager getTransactionManager() throws Exception {
      return (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
   }

}
