com.caucho.sql
Class UserDataSource

java.lang.Object
  extended by com.caucho.sql.UserDataSource
All Implemented Interfaces:
java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

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

The User DataSource returned from Resin's pool.


Field Summary
protected static java.util.logging.Logger log
           
 
Method Summary
 java.sql.Connection getConnection()
          Returns a connection.
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
          Returns a connection.
 int getLoginTimeout()
          Returns the login timeout.
 java.io.PrintWriter getLogWriter()
          Returns the log writer.
 java.lang.String getURL()
          Returns the primary URL for the connection
 boolean isWrapperFor(java.lang.Class<?> iface)
           
 void setLoginTimeout(int seconds)
          Returns the login timeout.
 void setLogWriter(java.io.PrintWriter out)
          Sets the log writer.
 java.lang.String toString()
           
<T> T
unwrap(java.lang.Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Method Detail

getURL

public java.lang.String getURL()
Returns the primary URL for the connection


getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Returns a connection.

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
Returns a connection.

Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
Returns the login timeout.

Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource

setLoginTimeout

public void setLoginTimeout(int seconds)
Returns the login timeout.

Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource

getLogWriter

public java.io.PrintWriter getLogWriter()
Returns the log writer.

Specified by:
getLogWriter in interface javax.sql.CommonDataSource

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
Sets the log writer.

Specified by:
setLogWriter in interface javax.sql.CommonDataSource

unwrap

public <T> T unwrap(java.lang.Class<T> iface)
         throws java.sql.SQLException
Specified by:
unwrap in interface java.sql.Wrapper
Throws:
java.sql.SQLException

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> iface)
                     throws java.sql.SQLException
Specified by:
isWrapperFor in interface java.sql.Wrapper
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object