com.jenkov.mrpersister.jdbc
Class SimpleDataSource

java.lang.Object
  extended by com.jenkov.mrpersister.jdbc.SimpleDataSource
All Implemented Interfaces:
javax.sql.DataSource

public class SimpleDataSource
extends java.lang.Object
implements javax.sql.DataSource

This class is still experimental. Though Mr. Persister will eventually get some connection creation mechanism this may not be it.

Author:
Jakob Jenkov - Copyright 2005 Jenkov Development

Constructor Summary
SimpleDataSource(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password)
           
 
Method Summary
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 int getLoginTimeout()
          Not supported.
 java.io.PrintWriter getLogWriter()
          Not supported.
 void setLoginTimeout(int seconds)
          Not supported.
 void setLogWriter(java.io.PrintWriter out)
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataSource

public SimpleDataSource(java.lang.String driver,
                        java.lang.String url,
                        java.lang.String user,
                        java.lang.String password)
Parameters:
driver -
url -
user -
password -
Throws:
java.lang.IllegalArgumentException - If the driver cannot be instantiated.
Method Detail

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Not supported.

Specified by:
getLoginTimeout in interface javax.sql.DataSource
Returns:
0
Throws:
java.sql.SQLException - Never.

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws java.sql.SQLException
Not supported.

Specified by:
setLoginTimeout in interface javax.sql.DataSource
Throws:
java.sql.SQLException - Never.

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Not supported.

Specified by:
getLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException - Never.

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws java.sql.SQLException
Not supported.

Specified by:
setLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException - Never.

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException