com.caucho.sql.spy
Class SpyXADataSource

java.lang.Object
  extended by com.caucho.sql.spy.SpyXADataSource
All Implemented Interfaces:
javax.sql.CommonDataSource, javax.sql.XADataSource

public class SpyXADataSource
extends java.lang.Object
implements javax.sql.XADataSource

Spying on a driver.


Field Summary
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
SpyXADataSource(javax.sql.XADataSource dataSource)
          Creates a new SpyDriver.
 
Method Summary
 int getLoginTimeout()
          Returns the login timeout.
 java.io.PrintWriter getLogWriter()
          Returns the log writer
 javax.sql.XAConnection getXAConnection()
          Returns the XAConnection.
 javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password)
          Returns the XAConnection.
protected  void log(long start, java.lang.String msg)
           
 void setLoginTimeout(int timeout)
          Sets the login timeout.
 void setLogWriter(java.io.PrintWriter log)
          Sets the log writer.
protected  long start()
           
 java.lang.String toString()
           
 
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

L

protected static final L10N L
Constructor Detail

SpyXADataSource

public SpyXADataSource(javax.sql.XADataSource dataSource)
Creates a new SpyDriver.

Method Detail

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Returns the XAConnection.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                              java.lang.String password)
                                       throws java.sql.SQLException
Returns the XAConnection.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Returns the login timeout.

Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

setLoginTimeout

public void setLoginTimeout(int timeout)
                     throws java.sql.SQLException
Sets the login timeout.

Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

getLogWriter

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

Specified by:
getLogWriter in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

setLogWriter

public void setLogWriter(java.io.PrintWriter log)
                  throws java.sql.SQLException
Sets the log writer.

Specified by:
setLogWriter in interface javax.sql.CommonDataSource
Throws:
java.sql.SQLException

start

protected long start()

log

protected void log(long start,
                   java.lang.String msg)

toString

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