com.p6spy.engine.spy
Class P6DataSource

java.lang.Object
  extended bycom.p6spy.engine.spy.P6Base
      extended bycom.p6spy.engine.spy.P6DataSource
All Implemented Interfaces:
javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
P6ConnectionPoolDataSource, P6XADataSource

public class P6DataSource
extends P6Base
implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  javax.sql.DataSource rds
           
protected  java.lang.String rdsName
           
 
Fields inherited from class com.p6spy.engine.spy.P6Base
factory
 
Constructor Summary
P6DataSource()
          Default no-arg constructor for Serialization
P6DataSource(javax.sql.DataSource source)
           
 
Method Summary
protected  void bindDataSource()
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 java.lang.String getRealDataSource()
           
 javax.naming.Reference getReference()
          Required method to support this class as a Referenceable.
static void initMethod()
           
 void setLoginTimeout(int inVar)
           
 void setLogWriter(java.io.PrintWriter inVar)
           
 void setRealDataSource(java.lang.String inVar)
           
 
Methods inherited from class com.p6spy.engine.spy.P6Base
getP6Factory, setP6Factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rds

protected javax.sql.DataSource rds

rdsName

protected java.lang.String rdsName
Constructor Detail

P6DataSource

public P6DataSource()
Default no-arg constructor for Serialization


P6DataSource

public P6DataSource(javax.sql.DataSource source)
Method Detail

initMethod

public static void initMethod()

getRealDataSource

public java.lang.String getRealDataSource()

setRealDataSource

public void setRealDataSource(java.lang.String inVar)

bindDataSource

protected void bindDataSource()
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Required method to support this class as a Referenceable.

Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException

getLoginTimeout

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

setLoginTimeout

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

getLogWriter

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

setLogWriter

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

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