Class PGXADataSource

    • Constructor Detail

      • PGXADataSource

        public PGXADataSource()
    • Method Detail

      • getXAConnection

        public XAConnection getXAConnection()
                                     throws SQLException
        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.
        Specified by:
        getXAConnection in interface XADataSource
        Returns:
        A valid database connection.
        Throws:
        SQLException - Occurs when the database connection cannot be established.
      • getXAConnection

        public XAConnection getXAConnection​(String user,
                                            String password)
                                     throws SQLException
        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.
        Specified by:
        getXAConnection in interface XADataSource
        Returns:
        A valid database connection.
        Throws:
        SQLException - Occurs when the database connection cannot be established.
      • getDescription

        public String getDescription()
        Description copied from class: BaseDataSource
        Gets a description of this DataSource-ish thing. Must be customized by subclasses.
        Specified by:
        getDescription in class BaseDataSource
        Returns:
        description of this DataSource-ish thing
      • createReference

        protected Reference createReference()
        Generates a reference using the appropriate object factory.
        Overrides:
        createReference in class BaseDataSource
        Returns:
        reference using the appropriate object factory