public interface WSConnection
extends java.sql.Connection
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLIENT_ACCOUNTING_INFO
The key used to set the CLIENT_ACCOUNTING_INFO
in the properties object passed by the user in setClientInformation().
|
static java.lang.String |
CLIENT_APPLICATION_NAME
The key used to set the CLIENT_APPLICATION_NAME
in the properties object passed by the user in setClientInformation().
|
static java.lang.String |
CLIENT_ID
The key used to set the CLIENT_ID
in the properties object passed by the user in setClientInformation().
|
static java.lang.String |
CLIENT_LOCATION
The key used to set the CLIENT_LOCATION
in the properties object passed by the user in setClientInformation().
|
static java.lang.String |
CLIENT_OTHER_INFO
The key used to set the CLIENT_OTHER_INFO
in the properties object passed by the user in setClientInformation().
|
static java.lang.String |
CLIENT_TYPE
The key used to set the CLIENT_TYPE
in the properties object passed by the user in setClientInformation().
|
Modifier and Type | Method and Description |
---|---|
void |
abort(java.util.concurrent.Executor e) |
void |
abort(java.util.concurrent.Executor e,
int abortType) |
int |
getAbortType() |
java.util.Properties |
getClientInformation()
This API returns the properties object set using setClientInformation()
|
WSSystemMonitor |
getSystemMonitor()
This method returns the System Monitor object from the backend database connection if
the database supports System Monitors.
|
void |
setAbortType(int atype) |
void |
setClientInformation(java.util.Properties props)
This API allows you to set client information on the WebSphere
connection.
|
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap
static final java.lang.String CLIENT_ACCOUNTING_INFO
static final java.lang.String CLIENT_LOCATION
static final java.lang.String CLIENT_ID
static final java.lang.String CLIENT_APPLICATION_NAME
static final java.lang.String CLIENT_OTHER_INFO
static final java.lang.String CLIENT_TYPE
void abort(java.util.concurrent.Executor e, int abortType) throws java.sql.SQLException
java.sql.SQLException
void abort(java.util.concurrent.Executor e) throws java.sql.SQLException
abort
in interface java.sql.Connection
java.sql.SQLException
int getAbortType()
void setAbortType(int atype)
void setClientInformation(java.util.Properties props) throws java.sql.SQLException
Example:
import com.ibm.websphere.rsadapter.WSConnection;
.....
try {
InitialContext ctx = new InitialContext();
// Perform a naming service lookup to get the DataSource object.
DataSource ds = (javax.sql.DataSource)ctx.lookup("java:comp/jdbc/myDS");
} catch (Exception e) {;}
WSConnection conn = (WSConnection) ds.getConnection();
Properties props = new Properties();
props.setProperty(WSConnection.CLIENT_ID, "user123");
props.setProperty(WSConnection.CLIENT_LOCATION, "127.0.0.1");
props.setProperty(WSConnection.CLIENT_ACCOUNTING_INFO , "accounting1");
props.setProperty(WSConnection.CLIENT_APPLICATION_NAME, "appname");
props.setProperty(WSConnection.CLIENT_TYPE, "JMS");
props.setProperty(WSConnection.CLIENT_OTHER_INFO, "cool stuff");
conn.setClientInformation(props);
conn.close();
props
- contains the client information to be passed, possible values are:WSConnection
documentation for more details on which
client information is passed to the backend database.
java.sql.SQLException
- thrown if database throws an exception when setting the datajava.util.Properties getClientInformation()
WSSystemMonitor getSystemMonitor() throws java.sql.SQLException
java.sql.SQLException
- if the database throws an exception