Package org.jboss.jca.adapters.jdbc
Class WrapperDataSource
java.lang.Object
org.jboss.jca.adapters.jdbc.JBossWrapper
org.jboss.jca.adapters.jdbc.WrapperDataSource
- All Implemented Interfaces:
Serializable,Wrapper,Referenceable,javax.resource.Referenceable,CommonDataSource,DataSource
public class WrapperDataSource
extends JBossWrapper
implements javax.resource.Referenceable, DataSource, Serializable
WrapperDataSource
- Version:
- $Revision: 71788 $
- Author:
- David Jencks, Adrian Brock, Jesper Pedersen
- See Also:
-
Field Summary
Fields inherited from class org.jboss.jca.adapters.jdbc.JBossWrapper
bundle -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWrapperDataSource(BaseWrapperManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager cm, ClassLoaderPlugin classLoaderPlugin) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck whether a tranasction is activegetConnection(String user, String password) intprotected intGet the time left before a transaction timeoutvoidsetLoginTimeout(int param1) voidvoidsetReference(Reference reference) Methods inherited from class org.jboss.jca.adapters.jdbc.JBossWrapper
getWrappedObject, isWrapperFor, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilderMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
WrapperDataSource
protected WrapperDataSource(BaseWrapperManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager cm, ClassLoaderPlugin classLoaderPlugin) Constructor- Parameters:
mcf- The managed connection factorycm- The connection manager
-
-
Method Details
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
setReference
- Specified by:
setReferencein interfacejavax.resource.Referenceable
-
getReference
- Specified by:
getReferencein interfaceReferenceable
-
getTimeLeftBeforeTransactionTimeout
Get the time left before a transaction timeout- Returns:
- The amount in seconds;
-1if no timeout - Throws:
SQLException- Thrown if an error occurs
-
checkTransactionActive
Check whether a tranasction is active- Throws:
SQLException- if the transaction is not active, preparing, prepared or committing or for any error in the transaction manager
-