com.ibm.websphere.rsadapter
Class MSSQLDataStoreHelperjava.lang.Object | +--com.ibm.websphere.rsadapter.GenericDataStoreHelper | +--com.ibm.websphere.rsadapter.MSSQLDataStoreHelper
- All Implemented Interfaces:
- DataStoreHelper, java.io.Serializable
- public class MSSQLDataStoreHelper
- extends GenericDataStoreHelper
- implements java.io.Serializable
MSSQLDataStoreHelper is used internally by other WebSphere-provided DataStoreHelper implementations. Do not subclass this class. Do not configure any DataSources to use this DataStoreHelper directly.
SQLException mappings specific to the MSSQLDataStoreHelper are the following:
Error Code SQL State PortableSQLException subclass 230 StaleConnectionException.class 2627 DuplicateKeyException.class
- See Also:
- Serialized Form
Field Summary static java.lang.String[] LOCK_OWNER_TPYES
static java.lang.String[] LOCK_REQUEST_MODES
static java.lang.String[] LOCK_REQUEST_STATUSES
static java.lang.String[] RESOURCE_TYPES
Fields inherited from class com.ibm.websphere.rsadapter.GenericDataStoreHelper EOLN, genErrorMap, resBundle
Fields inherited from interface com.ibm.websphere.rsadapter.DataStoreHelper CLOUDSCAPE_HELPER, CLOUDSCAPE_NETWORK_SERVER_HELPER, CONNECTJDBC_HELPER, CUSTOM_HELPER, DATADIRECT_HELPER, DB2_390_HELPER, DB2_390_LOCAL_HELPER, DB2_400_HELPER, DB2_HELPER, DB2_UNIVERSAL_HELPER, GENERIC_HELPER, INFORMIX_HELPER, MSSQL_HELPER, ORACLE_HELPER, POTENTIAL_DEADLOCK, POTENTIAL_LOST_UPDATE, SEQUELINK_HELPER, SYBASE_HELPER, SYBASE11_HELPER, TX_REPEATABLE_READ_FORUPDATE, TX_SERIALIZABLE_FORUPDATE, UPDATE_ON_READONLY, WSCONNECTJDBC_HELPER
Constructor Summary MSSQLDataStoreHelper(java.util.Properties props)
This MSSQLDataStoreHelper constructor creates a new MSSQLDataStoreHelper based on the DataStoreHelper properties provided.
Method Summary java.lang.Class findMappingClass(java.sql.SQLException e)
This method locates the com.ibm.websphere.ce.cm.PortableSQLException subclass corresponding to the specified SQLException, as defined by the MSSQLDataStoreHelper, GenericDataStoreHelper, and user-defined SQLException maps.int getIsolationLevel(com.ibm.websphere.appprofile.accessintent.AccessIntent intent)
This method determines the transaction isolation level based on the specified AccessIntent.int getResultSetConcurrency(com.ibm.websphere.appprofile.accessintent.AccessIntent intent)
This method determines the result set concurrency based on the specified AccessIntent.int getResultSetType(com.ibm.websphere.appprofile.accessintent.AccessIntent intent)
This method determines the result set concurrency based on the specified AccessIntent.java.lang.String showLockInfo(java.util.Properties props)
This method returns lock information for Microsoft SQL Server.
Methods inherited from class com.ibm.websphere.rsadapter.GenericDataStoreHelper calcPartitionNumber, doConnectionCleanup, doConnectionSetup, doStatementCleanup, getLockType, getMetaData, getPrintWriter, getXAExceptionContents, hasLostUpdateOrDeadLockOccurred, isBatchUpdateSupportedWithAccessIntent, isConnectionError, mapException, mapException, modifyXAFlag, processGenericCredentials, processSQL, processSQL, setUserDefinedMap
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail RESOURCE_TYPES
public static final java.lang.String[] RESOURCE_TYPES
LOCK_REQUEST_STATUSES
public static final java.lang.String[] LOCK_REQUEST_STATUSES
LOCK_OWNER_TPYES
public static final java.lang.String[] LOCK_OWNER_TPYES
LOCK_REQUEST_MODES
public static final java.lang.String[] LOCK_REQUEST_MODES
Constructor Detail MSSQLDataStoreHelper
public MSSQLDataStoreHelper(java.util.Properties props)
- This MSSQLDataStoreHelper constructor creates a new MSSQLDataStoreHelper based on the DataStoreHelper properties provided. The properties parameter is provided only for future extensibility and is currently unused.
- Parameters:
- props - DataStoreHelper properties.
Method Detail findMappingClass
public final java.lang.Class findMappingClass(java.sql.SQLException e)
This method locates the com.ibm.websphere.ce.cm.PortableSQLException subclass corresponding to the specified SQLException, as defined by the MSSQLDataStoreHelper, GenericDataStoreHelper, and user-defined SQLException maps. Precedence and related details of SQLException mapping are described on the DataStoreHelper.setUserDefinedMap method.
- Overrides:
- findMappingClass in class GenericDataStoreHelper
- Parameters:
- e - The SQLException for which to locate a com.ibm.websphere.ce.cm.PortableSQLException subclass.
- Returns:
- The com.ibm.websphere.ce.cm.PortableSQLException subclass matching the SQLException, or null if no match was found.
- See Also:
- SQLException, com.ibm.websphere.ce.cm.PortableSQLException.
getIsolationLevel
public int getIsolationLevel(com.ibm.websphere.appprofile.accessintent.AccessIntent intent) throws javax.resource.ResourceException
This method determines the transaction isolation level based on the specified AccessIntent. If the AccessIntent parameter is null, a default value is returned that is appropriate for the database backend.
MSSQLDataStoreHelper does not support this method and throws an exception if this method is invoked.
- Specified by:
- getIsolationLevel in interface DataStoreHelper
- Overrides:
- getIsolationLevel in class GenericDataStoreHelper
- Parameters:
- intent - An AccessIntent
- Returns:
- A transaction isolation level appropriate for the specified AccessIntent.
- Throws:
- javax.resource.ResourceException - If a transaction isolation level cannot be determined from the AccessIntent.
- See Also:
- AccessIntent, Connection
getResultSetType
public int getResultSetType(com.ibm.websphere.appprofile.accessintent.AccessIntent intent) throws javax.resource.ResourceException
- This method determines the result set concurrency based on the specified AccessIntent.
MSSQLDataStoreHelper does not support this method and throws an exception if this method is invoked.
- Specified by:
- getResultSetType in interface DataStoreHelper
- Overrides:
- getResultSetType in class GenericDataStoreHelper
- Parameters:
- intent - An AccessIntent.
- Returns:
- A result set concurrency constant defined on java.sql.ResultSet.
- Throws:
- javax.resource.ResourceException - If a result set concurrency cannot be determined from the AccessIntent.
- See Also:
- AccessIntent, ResultSet
getResultSetConcurrency
public int getResultSetConcurrency(com.ibm.websphere.appprofile.accessintent.AccessIntent intent) throws javax.resource.ResourceException
- This method determines the result set concurrency based on the specified AccessIntent.
MSSQLDataStoreHelper does not support this method and throws an exception if this method is invoked.
- Specified by:
- getResultSetConcurrency in interface DataStoreHelper
- Overrides:
- getResultSetConcurrency in class GenericDataStoreHelper
- Parameters:
- intent - An AccessIntent.
- Returns:
- A result set concurrency constant defined on java.sql.ResultSet.
- Throws:
- javax.resource.ResourceException - If a result set concurrency cannot be determined from the AccessIntent.
- See Also:
- AccessIntent, ResultSet
showLockInfo
public final java.lang.String showLockInfo(java.util.Properties props) throws java.lang.Exception
This method returns lock information for Microsoft SQL Server. The props parameter may include the following properties:
- user - user name that has a DBA authority. If not specified, a default value of "sa" is used.
- password - the password corresponding to the user name. If not specified, a default value of "" (empty string) is used.
- serverName - the server name where the Microsoft SQL Server database resides.
- portNumber - the port where Microsoft SQL Server is listening.
- Overrides:
- showLockInfo in class GenericDataStoreHelper
- Parameters:
- props - properties containing information needed to connect to the database.
- Returns:
- the lock information.
- Throws:
- java.lang.Exception - if an error occurs while collecting the lock information.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.