net.sourceforge.sqlunit
Class ConnectionFactory

java.lang.Object
  extended by net.sourceforge.sqlunit.ConnectionFactory

public final class ConnectionFactory
extends java.lang.Object

A factory to generate Connection objects given the Connection properties.

Version:
$Revision: 1.5 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Method Summary
static java.sql.Connection getInstance(java.util.Map props)
          Builds a Connection object out of a Map of Connection properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static java.sql.Connection getInstance(java.util.Map props)
                                       throws java.lang.Exception
Builds a Connection object out of a Map of Connection properties. The properties can either be for a JNDI or JDBC connection or some variant where SQLUnit uses the jarfile-url attribute to locate a driver JAR from the filesystem.

Parameters:
props - a Map of Connection properties.
Returns:
a Connection object.
Throws:
java.lang.Exception - if there was a problem building the connection.