SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.jdbc
Class ConfigurableDataSource

java.lang.Object
  |
  +--com.solarmetric.rd.jdbc.DelegatingDataSource
        |
        +--com.solarmetric.rd.jdbc.ConfigurableDataSource
All Implemented Interfaces:
javax.sql.DataSource
Direct Known Subclasses:
PSCacheDataSource

public class ConfigurableDataSource
extends DelegatingDataSource

Delegating data source that allows some configuration of the underlying connections. Understands the following properties:


Constructor Summary
ConfigurableDataSource(javax.sql.DataSource ds)
          Constructor.
 
Method Summary
 void addJDBCListener(com.solarmetric.rd.jdbc.JDBCListener listener)
          Add an event listener.
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String user, java.lang.String pass)
           
 boolean getIgnoreTransactionMethods()
          Set to true to create connections that ignore attmpts to begin and end transactions.
 int getQueryTimeout()
          The number of seconds to wait for a query to execute before terminating it.
 int getTransactionIsolation()
          The transaction isolation level.
 boolean removeJDBCListener(com.solarmetric.rd.jdbc.JDBCListener listener)
          Remove an event listener.
 void setIgnoreTransactionMethods(boolean ignore)
          Set to true to create connections that ignore attmpts to begin and end transactions.
 void setQueryTimeout(int timeout)
          The number of seconds to wait for a query to execute before terminating it.
 void setTransactionIsolation(int isolation)
          The transaction isolation level.
 void setTransactionIsolationLevel(java.lang.String isolation)
          The transaction isolation level.
 
Methods inherited from class com.solarmetric.rd.jdbc.DelegatingDataSource
appendInfo, equals, getDelegate, getInnermostDelegate, getLoginTimeout, getLogWriter, hashCode, setLoginTimeout, setLogWriter, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurableDataSource

public ConfigurableDataSource(javax.sql.DataSource ds)
Constructor. Supply wrapped data source.

Method Detail

getQueryTimeout

public int getQueryTimeout()
The number of seconds to wait for a query to execute before terminating it.


setQueryTimeout

public void setQueryTimeout(int timeout)
The number of seconds to wait for a query to execute before terminating it.


getTransactionIsolation

public int getTransactionIsolation()
The transaction isolation level.


setTransactionIsolation

public void setTransactionIsolation(int isolation)
The transaction isolation level.


setTransactionIsolationLevel

public void setTransactionIsolationLevel(java.lang.String isolation)
The transaction isolation level.


getIgnoreTransactionMethods

public boolean getIgnoreTransactionMethods()
Set to true to create connections that ignore attmpts to begin and end transactions. This is useful when the underlying DataSource already has its transactions controlled by an external entity such as an application server, but you want to write code that works without external transaction control too.


setIgnoreTransactionMethods

public void setIgnoreTransactionMethods(boolean ignore)
Set to true to create connections that ignore attmpts to begin and end transactions. This is useful when the underlying DataSource already has its transactions controlled by an external entity such as an application server, but you want to write code that works without external transaction control too.


addJDBCListener

public void addJDBCListener(com.solarmetric.rd.jdbc.JDBCListener listener)
Add an event listener.


removeJDBCListener

public boolean removeJDBCListener(com.solarmetric.rd.jdbc.JDBCListener listener)
Remove an event listener.


getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Overrides:
getConnection in class DelegatingDataSource
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String user,
                                         java.lang.String pass)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Overrides:
getConnection in class DelegatingDataSource
java.sql.SQLException

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.