public class P6DataSource extends Object implements DataSource, ConnectionPoolDataSource, XADataSource, Referenceable, Serializable
DataSource
implementation.Modifier and Type | Field and Description |
---|---|
protected String |
rdsName |
protected CommonDataSource |
realDataSource |
Constructor and Description |
---|
P6DataSource()
Default no-arg constructor for Serialization
|
P6DataSource(DataSource delegate)
Create a P6Spy DataSource wrapping another DataSource.
|
Modifier and Type | Method and Description |
---|---|
protected void |
bindDataSource()
Binds the JNDI DataSource to proxy.
|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
PooledConnection |
getPooledConnection() |
PooledConnection |
getPooledConnection(String user,
String password) |
String |
getRealDataSource()
Returns the JNDI name of the real data source.
|
Reference |
getReference() |
XAConnection |
getXAConnection() |
XAConnection |
getXAConnection(String user,
String password) |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int inVar) |
void |
setLogWriter(PrintWriter inVar) |
void |
setRealDataSource(String jndiName)
Sets the JNDI name of the DataSource to proxy.
|
<T> T |
unwrap(Class<T> iface) |
protected CommonDataSource realDataSource
protected String rdsName
public P6DataSource()
public P6DataSource(DataSource delegate)
delegate
- the DataSource to wrappublic String getRealDataSource()
public void setRealDataSource(String jndiName)
jndiName
- protected void bindDataSource() throws SQLException
SQLException
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLoginTimeout(int inVar) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter inVar) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface DataSource
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
public PooledConnection getPooledConnection() throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
public PooledConnection getPooledConnection(String user, String password) throws SQLException
getPooledConnection
in interface ConnectionPoolDataSource
SQLException
public XAConnection getXAConnection() throws SQLException
getXAConnection
in interface XADataSource
SQLException
public XAConnection getXAConnection(String user, String password) throws SQLException
getXAConnection
in interface XADataSource
SQLException
Copyright © 2002-2016 P6Spy. All Rights Reserved.