1 package org.hibernate.test.connections; 3 4 import org.hibernate.Session; 5 import org.hibernate.test.tm.DummyConnectionProvider; 6 import org.hibernate.test.tm.DummyTransactionManagerLookup; 7 import org.hibernate.cfg.Configuration; 8 import org.hibernate.cfg.Environment; 9 import junit.framework.Test; 10 import junit.framework.TestSuite; 11 12 17 public class CurrentSessionConnectionTest extends AggressiveReleaseTest { 18 19 public CurrentSessionConnectionTest(String name) { 20 super( name ); 21 } 22 23 public static Test suite() { 24 return new TestSuite( CurrentSessionConnectionTest.class ); 25 } 26 27 protected void configure(Configuration cfg) { 28 cfg.setProperty( Environment.CONNECTION_PROVIDER, DummyConnectionProvider.class.getName() ); 29 cfg.setProperty( Environment.TRANSACTION_MANAGER_STRATEGY, DummyTransactionManagerLookup.class.getName() ); 30 } 31 32 protected Session getSessionUnderTest() throws Throwable { 33 return getSessions().getCurrentSession(); 34 } 35 36 protected void release(Session session) { 37 } 39 } 40 | Popular Tags |