【Java开源代码栏目提醒】:网学会员鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“CurrentSessionConnectionTest.java”一文,供大家参考学习
// $Id: CurrentSessionConnectionTest.java 8324 2005-10-05 19:40:14Z steveebersole $
package org.hibernate.test.connections;
import org.hibernate.Session;
import org.hibernate.test.tm.DummyConnectionProvider;
import org.hibernate.test.tm.DummyTransactionManagerLookup;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Implementation of CurrentSessionConnectionTest.
*
* @author Steve Ebersole
*/
public class CurrentSessionConnectionTest extends AggressiveReleaseTest {
public CurrentSessionConnectionTest(String name) {
super( name );
}
public static Test suite() {
return new TestSuite( CurrentSessionConnectionTest.class );
}
protected Session getSessionUnderTest() throws Throwable {
return getSessions().getCurrentSession();
}
protected void release(Session session) {
// do nothing, txn synch should release session as part of current-session definition
}
}