~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/tm/DummyTransactionManagerLookup.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//$Id: DummyTransactionManagerLookup.java 5693 2005-02-13 01:59:07Z oneovthafew $
 
2
package org.hibernate.test.tm;
 
3
 
 
4
import java.util.Properties;
 
5
 
 
6
import javax.transaction.TransactionManager;
 
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 getTransactionManager(Properties 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 getUserTransactionName() {
 
25
                throw new UnsupportedOperationException();
 
26
        }
 
27
 
 
28
}