Distributed transaction management support

This feature provides a standard Java API for performing distributed transactions with either Adaptive Server.

NoteThis feature is designed for use in a large multitier environment.


Reference

See Chapter 7, “Distributed Transactions,” in the JDBC 2.0 Optional Package (formerly the JDBC 2.0 Standard Extension API).


Related interfaces


Background and system requirements

Figure 2-2: Distributed transaction management support with version 12.x

The distributed transaction management support with version 12.x contains a client application going into middle tier components using JTA to go into jConnect.Using TDS it goes into ASE 12.x.

Configuration by administrator: LDAP

This approach is the same as “1a. Configuration by administrator: LDAP” described in “JNDI for naming databases”, except that you enter an additional line to the LDIF entry. In the following example, the added line of code is displayed in bold.

dn:servername:myASE, o=MyCompany, c=US
1.3.6.1.4.1.897.4.2.5:TCP#1# mymachine 4000
1.3.6.1.4.1.897.4.2.10:PACKETSIZE=1024&user=me&password=secret
1.3.6.1.4.1.897.4.2.11:userdb 
1.3.6.1.4.1.897.4.2.18:XADataSource

Access by middle-tier clients

This procedure initializes three properties (INITIAL_CONTEXT_FACTORY, PROVIDER_URL, and OBJECT_FACTORIES), and retrieves a XADataSource object. For example:

...
XADataSource xads = (XADatasource) ctx.lookup("servername=myASE");
XAConnection xaconn = xads.getXAConnection();

or override the default settings for the user name and password:

...
XADataSource xads = (XADatasource) ctx.lookup("servername=myASE");
XAConnection xaconn = xads.getXAConnection("my_username","my_password");