|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WSConnection
Interface which enables an application to call certain methods on a connection.
Field Summary | |
---|---|
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(). |
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary | |
---|---|
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 |
setClientInformation(java.util.Properties props)
This API allows you to set client information on the WebSphere connection. |
Methods inherited from interface java.sql.Connection |
---|
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
static final java.lang.String CLIENT_ACCOUNTING_INFO
setClientInformation(Properties)
,
Constant Field Valuesstatic final java.lang.String CLIENT_LOCATION
setClientInformation(Properties)
,
Constant Field Valuesstatic final java.lang.String CLIENT_ID
setClientInformation(Properties)
,
Constant Field Valuesstatic final java.lang.String CLIENT_APPLICATION_NAME
setClientInformation(Properties)
,
Constant Field Valuesstatic final java.lang.String CLIENT_OTHER_INFO
setClientInformation(Properties)
,
Constant Field Valuesstatic final java.lang.String CLIENT_TYPE
setClientInformation(Properties)
,
Constant Field ValuesMethod Detail |
---|
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
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |