getJDBCConnection

 

public Connection getJDBCConnection(XADataSource xads, String userid, 
                                    String password) 
              throws MQException, SQLException, Exception;

Registers a database for coordination. Used to create a JDBC Connection which is coordinated by the queue manager after a call to begin.

Parameters

  • xads - database-specific implementation of the XADataSource interface that defines the details of the database. See the documentation for your database to determine how to create an appropriate XADataSource object to pass into this method.

  • userid - the user ID for connecting to the database.

  • password - the password for connecting to the database.

Returns

  • connection for use with the JTA-JDBC support.

Exceptions

  • MQException - if there is a WebSphere MQ failure.

  • SQLException - if there are problems getting the Connection object.

  • Exception - thrown to avoid problems with the JVM verifier for customers who are not using the JTA functionality. The actual exception thrown is javax.transaction.xa.XAException, which requires the jta.jar file to be added to the CLASSPATH for programs that did not previously require it.


uj15210_