Chapter 1 Jaguar Configuration


Managing XA resources

You must configure XA resources to access a specific database. XA resources differ from connection caches in that XA resources are XA-Library interfaces that maintain their own connection pool separate from the connection cache connection pool.

If a get connection call (such as the Java getConnection or the C JagCmGetConnection method call) is in a transaction, the XA resource is automatically used to return a connection. If a get connection call is not in a transaction, the connection cache is automatically used. If the transactional behavior for a component uses the Supported option, then Jaguar determines at runtime whether the component executes its get connection calls in a transaction; if it does, you must configure both a connection cache and a corresponding XA resource for a database.

By default, Jaguar uses these shared libraries or DLLs to obtain an XA resource that is exported from the database connection libraries:

Connection library

Shared library

DLL

Sybase Client Library 11.0

libjxa.so

libjxa.dll

Oracle OCI 7.x

libclntsh.so

xa73.dll

Oracle OCI 8.x

libclntsh.so

xa80.dll

To use a shared library or DLL other than the default, edit the connection cache properties file %JAGUAR%\Repository\ConnCache\<cache_name>.props. For example, to instruct Jaguar to use oraclient8.dll instead of xa80.dll for Oracle OCI 8.1.x, add this line to the connection cache properties file:

com.sybase.jaguar.conncache.xadllname = oraclient8.dll

Note   You must install XA resources in a Jaguar server before components in that server can access the XA resources. You must refresh XA resources, refresh the server, or restart the server before any changes to the list of installed XA resources or to XA resource properties take effect.

If you execute a transaction without an XA resource configured for a database, the Jaguar connection manager returns CS_FAIL.

If a configured XA resource is not running or cannot be connected to, the Jaguar server cannot initialize. To solve this problem, perform one of these tasks:

Steps To create OTS/XA transactions for XA resources:

  1. Right-click the Installed Connection Caches folder.

  2. Select Install XA Resource.

  3. Select either Install an Existing XA Resource, or Create and Install a New XA Resource.

  4. In the XA resource properties dialog, enter:

    Tab

    Property

    Description

    General

    Description

    A brief phrase describing the purpose of the XA resource.

    Server Name

    Name of the XA resource server. For JDBC, enter: NetworkProtocol=Tds:Server=yourServer:Port=TdsPort#
    where:

    yourServer is the server that the driver is installed on.
    TdsPort#
    is the port number where TDS calls are received.

    User Name

    A name you can use to access the server.

    Password

    The password for the user.

    Driver (Connection Library)

    DLL or Class Name

    The file name of the XA resource library. For JDBC, enter: com.sybase.jdbc2.jdbc.SybXADataSource

    Client Library 11.0

    Connections made via Sybase Open Client Client-Library version 11.1 (included with Jaguar). Client-Library is the proprietary, native C/C++ interface to Sybase databases and database gateways.

    OCI 7.x

    Oracle Call Interface version 7.x. OCI is the proprietary, native driver for C/C++ access to Oracle databases.

    OCI 8.x

    OCI version 8.x or later.

    JDBC

    A Java Database Connectivity driver such as Sybase jConnect.

    XA (Properties)

    Database Name

    If you selected CT-LIB, OCI 7.x, or 8.x, specify the database name.

    Default Open String

    The string used to connect to the XA resource. You cannot modify this string, which is automatically built from the information that you entered in the previous tabs.

    Open String Suffix

    In this optional field, you can specify any valid open string options. For example, for a Sybase Client-Library 11.0 XA resource, you can enter:

    -L logfile

    where logfile is where you want to store log information.

    Close String

    In this optional field, you can specify a value used by the resource to close a connection.

    See your XA resource documentation for more information about the Open String Suffix and Close String syntax.

  5. Click Refresh.


Note   If the Open String is set incorrectly, the Jaguar server does not initialize.

 


Copyright © 2000 Sybase, Inc. All rights reserved.