1 package org.hibernate.test.connections; 3 4 import org.hibernate.Session; 5 import org.hibernate.ConnectionReleaseMode; 6 import org.hibernate.cfg.Configuration; 7 import org.hibernate.cfg.Environment; 8 9 import junit.framework.Test; 10 import junit.framework.TestSuite; 11 12 17 public class BasicConnectionProviderTest extends ConnectionManagementTestCase { 18 19 public BasicConnectionProviderTest(String name) { 20 super( name ); 21 } 22 23 public static Test suite() { 24 return new TestSuite( BasicConnectionProviderTest.class ); 25 } 26 27 protected Session getSessionUnderTest() { 28 return openSession(); 29 } 30 31 protected void reconnect(Session session) { 32 session.reconnect(); 33 } 34 35 protected void configure(Configuration cfg) { 36 cfg.setProperty( Environment.RELEASE_CONNECTIONS, ConnectionReleaseMode.ON_CLOSE.toString() ); 37 } 38 } 39 | Popular Tags |