org.logicalcobwebs.proxool
Class HibernateTest

java.lang.Object
  extended by TestCase
      extended by org.logicalcobwebs.proxool.AbstractProxoolTest
          extended by org.logicalcobwebs.proxool.HibernateTest

public class HibernateTest
extends AbstractProxoolTest

Tests that we are able to get a connection from Hibernate. (Code contributed by Mark Eagle)

Version:
$Revision: 1.1 $, $Date: 2003/09/28 09:38:30 $
Author:
Bill Horsman {bill@logicalcobwebs.co.uk), $Author: billhorsman $ (current maintainer)

Field Summary
private static Log LOG
           
 
Constructor Summary
HibernateTest(java.lang.String alias)
           
 
Method Summary
 void testDirectHibernateConnection()
          Can we get a connection from a Proxool pool that we have already registered? We ask Hibernate to lookup the pool by its alias.
 void testHibernateConfiguredConnection()
          Can we get a connection from a pool configured by Hibernate
 void testSimpleHibernateConnection()
          Can we get a connection straight from Hibernate? We register the pool first and theb ask for Hibernate for it.
 
Methods inherited from class org.logicalcobwebs.proxool.AbstractProxoolTest
setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG
Constructor Detail

HibernateTest

public HibernateTest(java.lang.String alias)
Method Detail

testSimpleHibernateConnection

public void testSimpleHibernateConnection()
                                   throws HibernateException,
                                          ProxoolException
Can we get a connection straight from Hibernate? We register the pool first and theb ask for Hibernate for it.

Throws:
ProxoolException - if there was a Proxool problem
HibernateException - if there was a Hibernate problem

testDirectHibernateConnection

public void testDirectHibernateConnection()
                                   throws HibernateException,
                                          ProxoolException
Can we get a connection from a Proxool pool that we have already registered? We ask Hibernate to lookup the pool by its alias.

Throws:
ProxoolException - if there was a Proxool problem
HibernateException - if there was a Hibernate problem

testHibernateConfiguredConnection

public void testHibernateConfiguredConnection()
                                       throws HibernateException,
                                              ProxoolException
Can we get a connection from a pool configured by Hibernate

Throws:
ProxoolException - if there was a Proxool problem
HibernateException - if there was a Hibernate problem