O'Reilly logo

Database Programming with JDBC & Java, Second Edition by George Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required