Name

XADataSource

Synopsis

Interface Name: javax.sql.XADataSource

Superclass: None

Immediate Subclasses: None

Interfaces Implemented: None

Availability: New as of JDK 1.2

Description

The XADataSource interface is implemented by classes that provide a JNDI gateway into distributed connections.

Class Summary

public interface XADataSource {
    int getLoginTimeout( ) throws java.sql.SQLException;
    java.io.PrintWriter getLogWriter( ) 
      throws java.sql.SQLException;
    XAConnection getXAConnection( ) 
      throws java.sql.SQLException;
    XAConnection getXAConnection(String uid, String pw)
      throws java.sql.SQLException;
    void setLoginTimeout(int sec) 
      throws java.sql.SQLException;
    void setLogWriter(java.io.PrintWriter lw) 
      throws java.sql.SQLException;
}

Object Methods

getLoginTimeout( ) and setLoginTimeout( )

public int getLoginTimeout( ) throws java.sql.SQLException;
public void setLoginTimeout(int sec) 
  throws java.sql.SQLException;
Description

These methods get and set a connection for the interval that the system will wait to establish before giving up. This value is an interval in seconds. A value of zero directs the data source to depend on the default timeout for the underlying system.

getLogWriter( ) and setLogWriter( )

public java.io.PrintWriter getLogWriter( ) 
  throws java.sql.SQLException;
public void setLogWriter(java.io.PrintWriter pw)
  throws java.sql.SQLException;
Description

These methods get and set the print writer to be used for logging events. This character stream is used by all methods in this data source ...

Get Database Programming with JDBC & Java, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.