public class AwsWrapperXADataSource
extends java.lang.Object
implements javax.sql.XADataSource, java.io.Serializable
XADataSource entry point for the AWS Advanced JDBC Wrapper. It wraps a target
driver-specific XADataSource (for example org.postgresql.xa.PGXADataSource or
com.mysql.cj.jdbc.MysqlXADataSource) so the wrapper's plugin pipeline applies to the
application-facing Connection, while the XA control surface is delegated to the
target's XAResource.
Connection-switching plugins (read/write splitting, failover) are not supported on the XA path; see the XA documentation for the recommended two-datasource pattern. The wrapper's internal connection pool is also not applicable to the XA path (the transaction manager / application server provides XA connection pooling).
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable java.lang.String |
database |
protected @Nullable java.lang.String |
jdbcProtocol |
protected @Nullable java.lang.String |
jdbcUrl |
protected @Nullable java.io.PrintWriter |
logWriter |
protected @Nullable java.lang.String |
password |
protected @Nullable java.lang.String |
serverName |
protected @Nullable java.lang.String |
serverPort |
protected @Nullable java.lang.String |
targetDataSourceClassName |
protected @Nullable java.util.Properties |
targetDataSourceProperties |
protected @Nullable java.lang.String |
user |
| Constructor and Description |
|---|
AwsWrapperXADataSource() |
AwsWrapperXADataSource(CoreServicesContainer coreServicesContainer) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
getDatabase() |
@Nullable java.lang.String |
getJdbcProtocol() |
@Nullable java.lang.String |
getJdbcUrl() |
int |
getLoginTimeout() |
@Nullable java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
@Nullable java.lang.String |
getPassword() |
@Nullable java.lang.String |
getServerName() |
@Nullable java.lang.String |
getServerPort() |
@Nullable java.lang.String |
getTargetDataSourceClassName() |
@Nullable java.util.Properties |
getTargetDataSourceProperties() |
@Nullable java.lang.String |
getUser() |
javax.sql.XAConnection |
getXAConnection() |
javax.sql.XAConnection |
getXAConnection(@Nullable java.lang.String username,
@Nullable java.lang.String password) |
void |
setDatabase(@NonNull java.lang.String database) |
void |
setJdbcProtocol(@NonNull java.lang.String jdbcProtocol) |
void |
setJdbcUrl(@Nullable java.lang.String url) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
void |
setPassword(@Nullable java.lang.String password) |
void |
setServerName(@NonNull java.lang.String serverName) |
void |
setServerPort(@NonNull java.lang.String serverPort) |
void |
setTargetDataSourceClassName(@Nullable java.lang.String className) |
void |
setTargetDataSourceProperties(@Nullable java.util.Properties props) |
void |
setUser(@Nullable java.lang.String user) |
protected transient @Nullable java.io.PrintWriter logWriter
protected @Nullable java.lang.String user
protected @Nullable java.lang.String password
protected @Nullable java.lang.String jdbcUrl
protected @Nullable java.lang.String targetDataSourceClassName
protected @Nullable java.util.Properties targetDataSourceProperties
protected @Nullable java.lang.String jdbcProtocol
protected @Nullable java.lang.String serverName
protected @Nullable java.lang.String serverPort
protected @Nullable java.lang.String database
public AwsWrapperXADataSource()
public AwsWrapperXADataSource(CoreServicesContainer coreServicesContainer)
public void setTargetDataSourceClassName(@Nullable java.lang.String className)
public @Nullable java.lang.String getTargetDataSourceClassName()
public void setServerName(@NonNull java.lang.String serverName)
public @Nullable java.lang.String getServerName()
public void setServerPort(@NonNull java.lang.String serverPort)
public @Nullable java.lang.String getServerPort()
public void setDatabase(@NonNull java.lang.String database)
public @Nullable java.lang.String getDatabase()
public void setJdbcUrl(@Nullable java.lang.String url)
public @Nullable java.lang.String getJdbcUrl()
public void setJdbcProtocol(@NonNull java.lang.String jdbcProtocol)
public @Nullable java.lang.String getJdbcProtocol()
public void setTargetDataSourceProperties(@Nullable java.util.Properties props)
public @Nullable java.util.Properties getTargetDataSourceProperties()
public void setUser(@Nullable java.lang.String user)
public @Nullable java.lang.String getUser()
public void setPassword(@Nullable java.lang.String password)
public @Nullable java.lang.String getPassword()
public javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
getXAConnection in interface javax.sql.XADataSourcejava.sql.SQLExceptionpublic javax.sql.XAConnection getXAConnection(@Nullable java.lang.String username,
@Nullable java.lang.String password)
throws java.sql.SQLException
getXAConnection in interface javax.sql.XADataSourcejava.sql.SQLExceptionpublic @Nullable java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int seconds)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
getParentLogger in interface javax.sql.CommonDataSourcejava.sql.SQLFeatureNotSupportedException