DataSource implementation that delegates all calls to a WebSphere
target
DataSource , typically obtained from JNDI, applying a current
isolation level and/or current user credentials to every Connection obtained
from it.
Usage example, defining the target DataSource as an inner-bean JNDI lookup
(of course, you can link to any WebSphere DataSource through a bean reference):
WebSphereDataSourceAdapter() This constructor retrieves the WebSphere JDBC connection spec API,
so we can get obtain specific WebSphere Connections using reflection.
Method Summary
public void
afterPropertiesSet() Checks that the specified 'targetDataSource' actually is
a WebSphere WSDataSource.
doGetConnection(String username, String password) Builds a WebSphere JDBCConnectionSpec object for the current settings
and calls WSDataSource.getConnection(JDBCConnectionSpec).
Create a WebSphere JDBCConnectionSpec object for the given charateristics.
The default implementation uses reflection to apply the given settings.
Can be overridden in subclasses to customize the JDBCConnectionSpec object
(JDBCConnectionSpec javadoc;
IBM developerWorks article).
Parameters: isolationLevel - the isolation level to apply (or null if none) Parameters: readOnlyFlag - the read-only flag to apply (or null if none) Parameters: username - the username to apply (null or empty indicates the default) Parameters: password - the password to apply (may be null or empty) throws: SQLException - if thrown by JDBCConnectionSpec API methods See Also: com.ibm.websphere.rsadapter.JDBCConnectionSpec
Builds a WebSphere JDBCConnectionSpec object for the current settings
and calls WSDataSource.getConnection(JDBCConnectionSpec).
See Also:WebSphereDataSourceAdapter.createConnectionSpec See Also: com.ibm.websphere.rsadapter.WSDataSource.getConnection(com.ibm.websphere.rsadapter.JDBCConnectionSpec)
Methods inherited from org.springframework.jdbc.datasource.IsolationLevelDataSourceAdapter