com.p6spy.engine.spy

Class P6DataSource

Implemented Interfaces:
DataSource, Referenceable, Serializable
Known Direct Subclasses:
P6ConnectionPoolDataSource, P6XADataSource

public class P6DataSource
extends P6Base
implements DataSource, Referenceable, Serializable

$Author: aarvesen $ $Revision: 1.5 $ $Date: 2003/08/07 19:07:21 $ $Id: P6DataSource.java,v 1.5 2003/08/07 19:07:21 aarvesen Exp $ $Source: /cvsroot/p6spy/p6spy/com/p6spy/engine/spy/P6DataSource.java,v $ $Log: P6DataSource.java,v $ Revision 1.5 2003/08/07 19:07:21 aarvesen moved the existing constructor to the top of the file added a new constructor for wrapping a datasource on instantiation Revision 1.4 2003/06/03 16:07:33 aarvesen renamed setDataSourceName to setRealDataSource Revision 1.3 2003/01/30 23:35:22 dlukeparker Added support for the javax.sql operations for pooled connections. This is required for support of WebSphere. Finished implementation of com/p6spy/engine/spy/P6DataSource.java Added com/p6spy/engine/spy/P6ConnectionPoolDataSource.java Added com/p6spy/engine/spy/P6DataSourceFactory.java Added com/p6spy/engine/spy/P6PooledConnection.java Added com/p6spy/engine/spy/P6ProxyConnection.java Made changes in spy.properties and com/p6spy/engine/common/P6SpyOptions.java to enable datasource name, driver and properties setting. Also added support for specifying the JNDI context for finding the real datasource. Revision 1.2 2002/12/20 00:29:45 aarvesen removed the unneeded factory Revision 1.1 2002/12/19 23:51:45 aarvesen Data Source implementation

Field Summary

protected DataSource
rds
protected String
rdsName

Fields inherited from class com.p6spy.engine.spy.P6Base

factory

Constructor Summary

P6DataSource()
Default no-arg constructor for Serialization
P6DataSource(DataSource source)

Method Summary

protected void
bindDataSource()
Connection
getConnection()
Connection
getConnection(String username, String password)
PrintWriter
getLogWriter()
int
getLoginTimeout()
String
getRealDataSource()
Reference
getReference()
Required method to support this class as a Referenceable.
static void
initMethod()
void
setLogWriter(PrintWriter inVar)
void
setLoginTimeout(int inVar)
void
setRealDataSource(String inVar)

Methods inherited from class com.p6spy.engine.spy.P6Base

getP6Factory, setP6Factory

Field Details

rds

protected DataSource rds


rdsName

protected String rdsName

Constructor Details

P6DataSource

public P6DataSource()
Default no-arg constructor for Serialization


P6DataSource

public P6DataSource(DataSource source)

Method Details

bindDataSource

protected void bindDataSource()
            throws SQLException


getConnection

public Connection getConnection()
            throws SQLException


getConnection

public Connection getConnection(String username,
                                String password)
            throws SQLException


getLogWriter

public PrintWriter getLogWriter()
            throws SQLException


getLoginTimeout

public int getLoginTimeout()
            throws SQLException


getRealDataSource

public String getRealDataSource()


getReference

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


initMethod

public static void initMethod()


setLogWriter

public void setLogWriter(PrintWriter inVar)
            throws SQLException


setLoginTimeout

public void setLoginTimeout(int inVar)
            throws SQLException


setRealDataSource

public void setRealDataSource(String inVar)