KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > tm > DummyTransactionManagerLookup


1 //$Id: DummyTransactionManagerLookup.java,v 1.3 2005/02/13 01:59:07 oneovthafew Exp $
2
package org.hibernate.test.tm;
3
4 import java.util.Properties JavaDoc;
5
6 import javax.transaction.TransactionManager JavaDoc;
7
8 import org.hibernate.HibernateException;
9 import org.hibernate.transaction.TransactionManagerLookup;
10
11 /**
12  * @author Gavin King
13  */

14 public class DummyTransactionManagerLookup implements TransactionManagerLookup {
15
16     public TransactionManager JavaDoc getTransactionManager(Properties JavaDoc props)
17     throws HibernateException {
18         if ( DummyTransactionManager.INSTANCE == null ) {
19             DummyTransactionManager.INSTANCE = new DummyTransactionManager(props);
20         }
21         return DummyTransactionManager.INSTANCE;
22     }
23
24     public String JavaDoc getUserTransactionName() {
25         throw new UnsupportedOperationException JavaDoc();
26     }
27
28 }
29
Popular Tags