net.sf.farrago.namespace.jdbc
Class MedJdbcUDR
java.lang.Object
net.sf.farrago.namespace.jdbc.MedJdbcUDR
public abstract class MedJdbcUDR
- extends Object
MedJdbcUDR defines some user-defined routines related to MedJdbc. They are
used for testing since MedJdbc is the only code which is always built as a
jar, even in development environments.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/namespace/jdbc/MedJdbcUDR.java#9 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MedJdbcUDR
public MedJdbcUDR()
testConnection
public static void testConnection(String driverClassName,
String url,
String userName,
String password)
throws SQLException,
ClassNotFoundException
- Uses parameters to test whether a given JDBC connection can be
successfully established.
- Parameters:
driverClassName
- fully-qualified name of the driver class to load
(must be pre-installed on Farrago's classpath)url
- JDBC url to use for connectionuserName
- name of user to connect aspassword
- password to connect with
- Throws:
SQLException
ClassNotFoundException
getDriverForUrl
public static String getDriverForUrl(String url)
- Attempts to determine the driver class name for a given JDBC URL.
- Parameters:
url
- JDBC url
- Returns:
- fully-qualified class name of driver to use, or null if none
found