Top Description Constructors Methods
org.postgresql.xa

public Class PGXADataSource

extends BaseDataSource
implements XADataSource
Class Inheritance
All Implemented Interfaces
javax.sql.XADataSource, javax.sql.CommonDataSource
Imports
org.postgresql.core.BaseConnection, org.postgresql.ds.common.BaseDataSource, org.postgresql.util.DriverInfo, org.checkerframework.checker.nullness.qual.Nullable, java.sql.Connection, .SQLException, javax.naming.Reference, javax.sql.XAConnection, .XADataSource

XA-enabled DataSource implementation.
Author
Heikki Linnakangas ([email protected])

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Reference
createReference()

Overrides org.postgresql.ds.common.BaseDataSource.createReference.

Generates a reference using the appropriate object factory.

public String
getDescription()

Implements abstract org.postgresql.ds.common.BaseDataSource.getDescription.

Gets a description of this DataSource-ish thing.

public XAConnection

Returns:

A valid database connection.
getXAConnection
()

Implements javax.sql.XADataSource.getXAConnection.

Gets a connection to the PostgreSQL database.

public XAConnection

Returns:

A valid database connection.
getXAConnection
(@Nullable String
the database user on whose behalf the connection is being made
user
,
@Nullable String
the user's password
password
)

Implements javax.sql.XADataSource.getXAConnection.

Gets a XA-enabled connection to the PostgreSQL database.

Inherited from org.postgresql.ds.common.BaseDataSource:
getAdaptiveFetchgetAdaptiveFetchMaximumgetAdaptiveFetchMinimumgetAllowEncodingChangesgetApplicationNamegetAssumeMinServerVersiongetAuthenticationPluginClassNamegetAutosavegetBinaryTransfergetBinaryTransferDisablegetBinaryTransferEnablegetCancelSignalTimeoutgetCleanupSavepointsgetConnectiongetConnectiongetConnectTimeoutgetCurrentSchemagetDatabaseMetadataCacheFieldsgetDatabaseMetadataCacheFieldsMiBgetDatabaseNamegetDefaultRowFetchSizegetDisableColumnSanitisergetEscapeSyntaxCallModegetGroupStartupParametersgetGssEncModegetGssLibgetGssResponseTimeoutgetHideUnprivilegedObjectsgetHostRecheckSecondsgetJaasApplicationNamegetJaasLogingetKerberosServerNamegetLoadBalanceHostsgetLocalSocketAddressgetLoggerFilegetLoggerLevelgetLoginTimeoutgetLogServerErrorDetailgetLogUnclosedConnectionsgetLogWritergetMaxResultBuffergetOptionsgetParentLoggergetPasswordgetPortNumbergetPortNumbersgetPreferQueryModegetPreparedStatementCacheQueriesgetPreparedStatementCacheSizeMiBgetPrepareThresholdgetPropertygetPropertygetProtocolVersiongetQuoteReturningIdentifiersgetReadOnlygetReadOnlyModegetReceiveBufferSizegetRecvBufferSizegetReferencegetReplicationgetReWriteBatchedInsertsgetSendBufferSizegetServerNamegetServerNamesgetSocketFactorygetSocketFactoryArggetSocketTimeoutgetSslgetSslCertgetSslcertgetSslfactorygetSslFactoryArggetSslfactoryarggetSslHostnameVerifiergetSslhostnameverifiergetSslKeygetSslkeygetSslModegetSslmodegetSslPasswordgetSslpasswordgetSslPasswordCallbackgetSslpasswordcallbackgetSslResponseTimeoutgetSslRootCertgetSslrootcertgetSspiServiceClassgetStringTypegetTargetServerTypegetTcpKeepAlivegetTcpNoDelaygetUnknownLengthgetUrlgetURLgetUsergetUseSpNegogetXmlFactoryFactoryinitializeFromisAllowEncodingChangesisCleanupSavePointsisColumnSanitiserDisabledisDisableColumnSanitiserisLoadBalanceHostsisLogUnclosedConnectionsisReadOnlyisReWriteBatchedInsertsisSslisTcpKeepAlivereadBaseObjectsetAdaptiveFetchsetAdaptiveFetchMaximumsetAdaptiveFetchMinimumsetAllowEncodingChangessetApplicationNamesetAssumeMinServerVersionsetAuthenticationPluginClassNamesetAutosavesetBinaryTransfersetBinaryTransferDisablesetBinaryTransferEnablesetCancelSignalTimeoutsetCleanupSavepointssetCleanupSavePointssetConnectTimeoutsetCurrentSchemasetDatabaseMetadataCacheFieldssetDatabaseMetadataCacheFieldsMiBsetDatabaseNamesetDefaultRowFetchSizesetDisableColumnSanitisersetEscapeSyntaxCallModesetFromReferencesetGroupStartupParameterssetGssEncModesetGssLibsetGssResponseTimeoutsetHideUnprivilegedObjectssetHostRecheckSecondssetJaasApplicationNamesetJaasLoginsetKerberosServerNamesetLoadBalanceHostssetLocalSocketAddresssetLoggerFilesetLoggerLevelsetLoginTimeoutsetLogServerErrorDetailsetLogUnclosedConnectionssetLogWritersetMaxResultBuffersetOptionssetPasswordsetPortNumbersetPortNumberssetPreferQueryModesetPreparedStatementCacheQueriessetPreparedStatementCacheSizeMiBsetPrepareThresholdsetPropertysetPropertysetProtocolVersionsetQuoteReturningIdentifierssetReadOnlysetReadOnlyModesetReceiveBufferSizesetRecvBufferSizesetReplicationsetReWriteBatchedInsertssetSendBufferSizesetServerNamesetServerNamessetSocketFactorysetSocketFactoryArgsetSocketTimeoutsetSslsetSslCertsetSslcertsetSslfactorysetSslFactoryArgsetSslfactoryargsetSslHostnameVerifiersetSslhostnameverifiersetSslKeysetSslkeysetSslModesetSslmodesetSslPasswordsetSslpasswordsetSslPasswordCallbacksetSslpasswordcallbacksetSslResponseTimeoutsetSslRootCertsetSslrootcertsetSspiServiceClasssetStringTypesetTargetServerTypesetTcpKeepAlivesetTcpNoDelaysetUnknownLengthsetUrlsetURLsetUsersetUseSpNegosetXmlFactoryFactorywriteBaseObject

Constructor Detail

PGXADataSourceback to summary
public PGXADataSource()

Method Detail

createReferenceback to summary
protected Reference createReference()

Overrides org.postgresql.ds.common.BaseDataSource.createReference.

Generates a reference using the appropriate object factory.

Returns:Reference

Doc from org.postgresql.ds.common.BaseDataSource.createReference.

reference using the appropriate object factory

getDescriptionback to summary
public String getDescription()

Implements abstract org.postgresql.ds.common.BaseDataSource.getDescription.

Doc from org.postgresql.ds.common.BaseDataSource.getDescription.

Gets a description of this DataSource-ish thing. Must be customized by subclasses.

Returns:String

description of this DataSource-ish thing

Annotations
@Override
getXAConnectionback to summary
public XAConnection getXAConnection() throws SQLException

Implements javax.sql.XADataSource.getXAConnection.

Gets a connection to the PostgreSQL database. The database is identified by the DataSource properties serverName, databaseName, and portNumber. The user to connect as is identified by the DataSource properties user and password.

Returns:XAConnection

A valid database connection.

Annotations
@Override
Exceptions
SQLException:
Occurs when the database connection cannot be established.
getXAConnectionback to summary
public XAConnection getXAConnection(@Nullable String user, @Nullable String password) throws SQLException

Implements javax.sql.XADataSource.getXAConnection.

Gets a XA-enabled connection to the PostgreSQL database. The database is identified by the DataSource properties serverName, databaseName, and portNumber. The user to connect as is identified by the arguments user and password, which override the DataSource properties by the same name.

Parameters
user:@Nullable String

Doc from javax.sql.XADataSource.getXAConnection.

the database user on whose behalf the connection is being made

password:@Nullable String

Doc from javax.sql.XADataSource.getXAConnection.

the user's password

Returns:XAConnection

A valid database connection.

Annotations
@Override
Exceptions
SQLException:
Occurs when the database connection cannot be established.