safejdbc
Class TxDataSourceAdapter

java.lang.Object
safejdbc.DataSourceAdapter
safejdbc.TxDataSourceAdapter
- All Implemented Interfaces:
- ConnectionProvider
- public class TxDataSourceAdapter
- extends DataSourceAdapter
Some J2EE environments (e.g. BEA Weblogic 7.0) are providing
DataSources with special behaviors (i.e. Connections provided by
these DataSources are throwing an Exception when "commit" or
"rollback" is invoked).
The TxDataSourceAdapter wrapps such "special" DataSources and
returns Proxy-Connections to the framework, wich are ignoring calls
to "commit" or "rollback".
As a rule of thumb, you should use a TxDataSourceAdapter, when
transactions are managed "externaly" (e.g. by a J2EE container).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONNECTION_CLASS
private static final java.lang.Class[] CONNECTION_CLASS
_classLoader
private static final java.lang.ClassLoader _classLoader
TxDataSourceAdapter
public TxDataSourceAdapter(javax.sql.DataSource datasource)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Description copied from interface:
ConnectionProvider
- This method is called to actually give the connection
- Specified by:
getConnection in interface ConnectionProvider- Overrides:
getConnection in class DataSourceAdapter