KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > connections > BasicConnectionProviderTest


1 // $Id: BasicConnectionProviderTest.java,v 1.2 2005/05/12 18:27:21 steveebersole Exp $
2
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 /**
13  * Implementation of BasicConnectionProviderTest.
14  *
15  * @author Steve Ebersole
16  */

17 public class BasicConnectionProviderTest extends ConnectionManagementTestCase {
18
19     public BasicConnectionProviderTest(String JavaDoc 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