org.jasig.portal
Class RDBMServices.GenericDataSource

java.lang.Object
  extended by org.jasig.portal.RDBMServices.GenericDataSource
All Implemented Interfaces:
javax.sql.DataSource
Enclosing class:
RDBMServices

public static class RDBMServices.GenericDataSource
extends java.lang.Object
implements javax.sql.DataSource

Inner class implementation of DataSource. We currently construct an instance of this class from the properties defined in rdbm.properties when we are using rdbm.properties to define our core uPortal DataSource.

Author:
Eric Dalquist edalquist@unicon.net

Field Summary
private  java.sql.Driver driverRef
           
private  java.util.Properties jdbcProperties
           
private  java.lang.String jdbcUrl
           
private  java.io.PrintWriter log
           
private  java.lang.String password
           
private  java.lang.String userName
           
 
Constructor Summary
RDBMServices.GenericDataSource(java.sql.Driver d, java.lang.String url, java.lang.String user, java.lang.String pass)
          Create a new RDBMServices.GenericDataSource with the wraps the specified Driver.
 
Method Summary
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String user, java.lang.String pass)
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 void setLoginTimeout(int timeout)
           
 void setLogWriter(java.io.PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driverRef

private final java.sql.Driver driverRef

userName

private final java.lang.String userName

password

private final java.lang.String password

jdbcUrl

private final java.lang.String jdbcUrl

jdbcProperties

private final java.util.Properties jdbcProperties

log

private java.io.PrintWriter log
Constructor Detail

RDBMServices.GenericDataSource

public RDBMServices.GenericDataSource(java.sql.Driver d,
                                      java.lang.String url,
                                      java.lang.String user,
                                      java.lang.String pass)
Create a new RDBMServices.GenericDataSource with the wraps the specified Driver.

Parameters:
d - The Driver to wrap.
Method Detail

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Specified by:
getLoginTimeout in interface javax.sql.DataSource
Throws:
java.sql.SQLException
See Also:
DataSource.getLoginTimeout()

setLoginTimeout

public void setLoginTimeout(int timeout)
                     throws java.sql.SQLException
Specified by:
setLoginTimeout in interface javax.sql.DataSource
Throws:
java.sql.SQLException
See Also:
DataSource.setLoginTimeout(int)

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Specified by:
getLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException
See Also:
DataSource.getLogWriter()

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws java.sql.SQLException
Specified by:
setLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException
See Also:
DataSource.setLogWriter(java.io.PrintWriter)

getConnection

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

getConnection

public java.sql.Connection getConnection(java.lang.String user,
                                         java.lang.String pass)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException
See Also:
DataSource.getConnection(java.lang.String, java.lang.String)