com.ibm.websphere.rsadapter
Class JdbcAccessorImpl
- java.lang.Object
com.ibm.websphere.rsadapter.JdbcAccessorImpl
Deprecated. This class will likely be removed in a future release.
- @Deprecated public class JdbcAccessorImpl
- extends java.lang.Object
- implements WSNativeConnectionAccessor
This is the Generic JdbcAccessor, for accessing non-WebSphere-specific Native Connections.
A DataSource is passed to this object on the constructor. The getConnection() methods use the DataSource to create new Native Connections. The Native Connections are stored in the CCI Connection objects, and passed back to this object when a Native Connection method is invoked.
Constructor Summary
Constructor and Description |
---|
JdbcAccessorImpl()
Deprecated.
|
JdbcAccessorImpl(javax.sql.DataSource datasource)
Deprecated. This constructor takes a Datasource as an input parameter.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
clearWarnings(java.lang.Object nativeConnection,WSInteractionSpec interactionSpec)
Deprecated. This method clears all the warnings for an Interaction associated
with the Native Connection.
|
|
close(java.lang.Object nativeConnection)
Deprecated. This method initiates a close of the connection.
|
|
getConnection()
Deprecated. This method gets a native connection.
|
|
getConnection(WSCciConnectionSpec connectionSpec)
Deprecated. This method gets a native connection.
|
|
getMetaData(java.lang.Object nativeConnection)
Deprecated. This method gets the information on the underlying database instance
represented through an active connection.
|
|
getResultSetInfo(java.lang.Object nativeConnection)
Deprecated. This method returns an object from which information on the ResultSet
functionality can be determined.
|
|
getWarnings(java.lang.Object nativeConnection,WSInteractionSpec interactionSpec)
Deprecated. This method returns the first ResourceWarning of the chain of
warnings for an Interaction associated with the Native Connection.
|
|
isClosed(java.lang.Object nativeConnection)
Deprecated. This method checks to see if the native connection is closed.
|
|
localTransactionBegin(java.lang.Object nativeConnection)
Deprecated. This method initiates a local transaction begin().
|
|
localTransactionCommit(java.lang.Object nativeConnection)
Deprecated. This method initiates a local transaction commit().
|
|
localTransactionRollback(java.lang.Object nativeConnection)
Deprecated. This method initiates a local transaction rollback().
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
JdbcAccessorImpl
- public JdbcAccessorImpl()
JdbcAccessorImpl
- public JdbcAccessorImpl(javax.sql.DataSource datasource)
datasource
- - a javax.sql.DataSource Method Detail
getConnection
- public java.lang.Object getConnection( WSCciConnectionSpec connectionSpec)
- throws javax.resource.ResourceException
It is important to note that the properties passed through the getConnection method are be client-specific (for example: username, password, language) and not related to the configuration of a target database instance (example: port number, server name). The ManagedConnectionFactory instance is configured with the complete set of properties required for the creation of a connection to a database instance.
getConnection
in interface WSNativeConnectionAccessor
connectionSpec
- - Connection parameters and security information specified
as a com.ibm.websphere.rsadapter.WSConnectionSpec instance javax.resource.ResourceException
- - Failed to get a connection instance.
Examples of error cases are:
- Specification of input parameters that are not valid
- Configuration of ManagedConnectionFactory that is not valid; for example: a server name that is not valid
- Application server-internal error; for example: connection pool related error
- Communication error
- EIS-specific error; for example: database not active
- Resource adapter-internal error
- Security related error; for example: user that is not valid
- Failure to allocate system resources
getConnection
- public java.lang.Object getConnection( )
- throws javax.resource.ResourceException
getConnection
in interface WSNativeConnectionAccessor
javax.resource.ResourceException
- - Failed to get a connection instance.
Examples of error cases are:
- Configuration that is not valid of ManagedConnectionFactory; for example: a server name that is not valid
- Application server-internal error; for example: connection pool related error
- Communication error
- EIS-specific error; for example: EIS not active
- Resource adapter-internal error
- Security related error; example: user that is not
- Failure to allocate system resources
close
- public void close(java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
close
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection on which to do the close() javax.resource.ResourceException
- - Exception thrown if close on a connection fails.
Any invalid connection close invocation--example, calling close on a connection that is already closed--should also throw this exception.
isClosed
- public boolean isClosed(java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
isClosed
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection on which to do isClosed() javax.resource.ResourceException
- - Exception thrown if there is a problem checking
if the connection is closed. clearWarnings
- public void clearWarnings(java.lang.Object nativeConnection,
- WSInteractionSpec interactionSpec)
- throws javax.resource.ResourceException
clearWarnings
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection associated with the Interaction interactionSpec
- - the WSInteractionSpec associated with the Interaction javax.resource.ResourceException
- - Failed to clear ResourceWarnings getWarnings
- public javax.resource.cci.ResourceWarning getWarnings( java.lang.Object nativeConnection,
- WSInteractionSpec interactionSpec)
- throws javax.resource.ResourceException
getWarnings
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection associated with the Interaction interactionSpec
- - the WSInteractionSpec associated with the Interaction javax.resource.ResourceException
- - Failed to get ResourceWarnings localTransactionBegin
- public void localTransactionBegin( java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
localTransactionBegin
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection on which to do the begin() javax.resource.ResourceException
- - Failed to begin a local transaction localTransactionCommit
- public void localTransactionCommit( java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
localTransactionCommit
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection on which to do the commit() javax.resource.ResourceException
- - Failed to commit a local transaction localTransactionRollback
- public void localTransactionRollback( java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
localTransactionRollback
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection on which to do the rollback() javax.resource.ResourceException
- - Failed to roll back a local transaction getMetaData
- public javax.resource.cci.ConnectionMetaData getMetaData( java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
getMetaData
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection from which to get the MetaData javax.resource.ResourceException
- - Failed to get information about the
connected database instance. Error can be resource
adapter-internal, EIS-specific or communication related. getResultSetInfo
- public javax.resource.cci.ResultSetInfo getResultSetInfo( java.lang.Object nativeConnection)
- throws javax.resource.ResourceException
getResultSetInfo
in interface WSNativeConnectionAccessor
nativeConnection
- - the Connection used by the returned object to get the ResultSetInfo javax.resource.ResourceException
- - Failed to get ResultSet related information
The parameter is required -- NullPointerExceptions might occur if it is null.