|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This WSNativeConnectionAccessor interface provides a conduit for the WebSphere ResourceAdapter CCI function to access the Native Connection. All Native Connection accesses are funneled through the methods defined on this interface.
Each class that implements this interface determines the object type of the Native Connection. The Native Connection is passed in on each method and used to fulfill the contract of the method. Any object that allows this to be done is valid as a Native Connection.
Method Summary | |
---|---|
void |
clearWarnings(java.lang.Object nativeConnection,
WSInteractionSpec interactionSpec)
This method clears all the warnings for an Interaction associated with the Native Connection. |
void |
close(java.lang.Object nativeConnection)
This method initiates a close of the connection. |
java.lang.Object |
getConnection()
This method gets a Native Connection. |
java.lang.Object |
getConnection(WSCciConnectionSpec connectionSpec)
This method gets a Native Connection. |
javax.resource.cci.ConnectionMetaData |
getMetaData(java.lang.Object nativeConnection)
This method gets the information on the underlying database instance represented through an active connection. |
javax.resource.cci.ResultSetInfo |
getResultSetInfo(java.lang.Object nativeConnection)
This method returns an object from which information on the ResultSet functionality can be determined. |
javax.resource.cci.ResourceWarning |
getWarnings(java.lang.Object nativeConnection,
WSInteractionSpec interactionSpec)
This method returns the first ResourceWarning of the chain of warnings for an Interaction associated with the Native Connection. |
boolean |
isClosed(java.lang.Object nativeConnection)
This method checks if the native connection is closed. |
void |
localTransactionBegin(java.lang.Object nativeConnection)
This method initiates a local transaction begin(). |
void |
localTransactionCommit(java.lang.Object nativeConnection)
This method initiates a local transaction commit(). |
void |
localTransactionRollback(java.lang.Object nativeConnection)
This method initiates a local transaction rollback(). |
Method Detail |
public java.lang.Object getConnection(WSCciConnectionSpec connectionSpec) throws javax.resource.ResourceException
It is important to note that the properties passed through the getConnection method should be client-specific (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.
connectionSpec
- - Connection parameters and security information specified
as a com.ibm.websphere.rsadapter.WSConnectionSpec instancejavax.resource.ResourceException
- - Failed to get a connection instance.
Examples of error cases are:
public java.lang.Object getConnection() throws javax.resource.ResourceException
javax.resource.ResourceException
- - Failed to get a connection instance.
Examples of error cases are:
public void close(java.lang.Object nativeConnection) throws javax.resource.ResourceException
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.
public boolean isClosed(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection on which to do isClosed()javax.resource.ResourceException
- - Exception thrown if there is a problem checking
if the connection is closed.public void clearWarnings(java.lang.Object nativeConnection, WSInteractionSpec interactionSpec) throws javax.resource.ResourceException
nativeConnection
- - the Connection associated with the InteractioninteractionSpec
- - the WSInteractionSpec associated with the Interactionjavax.resource.ResourceException
- - Failed to clear ResourceWarningspublic javax.resource.cci.ResourceWarning getWarnings(java.lang.Object nativeConnection, WSInteractionSpec interactionSpec) throws javax.resource.ResourceException
nativeConnection
- - the Connection associated with the InteractioninteractionSpec
- - the WSInteractionSpec associated with the Interactionjavax.resource.ResourceException
- - Failed to get ResourceWarningspublic void localTransactionBegin(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection on which to do the begin()javax.resource.ResourceException
- - Failed to begin a local transactionpublic void localTransactionCommit(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection on which to do the commit()javax.resource.ResourceException
- - Failed to commit a local transactionpublic void localTransactionRollback(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection on which to do the rollback()javax.resource.ResourceException
- - Failed to roll back a local transactionpublic javax.resource.cci.ConnectionMetaData getMetaData(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection from which to get the MetaDatajavax.resource.ResourceException
- - Failed to get information about the
connected database instance. Error can be resource
adapter-internal, EIS-specific or communication related.public javax.resource.cci.ResultSetInfo getResultSetInfo(java.lang.Object nativeConnection) throws javax.resource.ResourceException
nativeConnection
- - the Connection used by the returned object to get the ResultSetInfojavax.resource.ResourceException
- - Failed to get ResultSet related information
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |