public class MysqlConnectorJDriverHelper
extends java.lang.Object
| Constructor and Description |
|---|
MysqlConnectorJDriverHelper() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getSQLState(java.lang.Throwable throwable) |
boolean |
isDriverRegistered() |
void |
prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props) |
void |
prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.util.Properties props)
Applies the AWS Wrapper TCP keep-alive and timeout properties to a MySQL Connector/J data source
(including
MysqlXADataSource). |
void |
registerDriver() |
public void prepareDataSource(@NonNull javax.sql.DataSource dataSource,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void prepareTargetDataSource(@NonNull javax.sql.CommonDataSource dataSource,
@NonNull java.util.Properties props)
throws java.sql.SQLException
MysqlXADataSource). Connector/J expresses connect/socket timeouts in
milliseconds, the same unit as the corresponding wrapper properties, so the values are passed
through unchanged. Non-Connector/J data sources are left untouched.dataSource - the target data source to configure.props - the connection properties.java.sql.SQLException - if a setting cannot be applied to the data source.public boolean isDriverRegistered()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void registerDriver()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getSQLState(java.lang.Throwable throwable)