Setting up XA resources

This section describes procedures for configuring and enabling XA resources on Adaptive Server and EJB Server.

StepsTo configure Adaptive Server and EJB Server for XA resources:

You can also perform steps 2 and 4 from the Adaptive Server plug-in.

  1. Make a copy of the $SYBASE/$SYBASE_EJB/config/afconfig.dat file and move the copy to a secure location. If the XA configuration process fails, you will need to copy an uncorrupted version of this file back into the release area before reconfiguring XA resources.

  2. Enable Distributed Transaction Management (DTM) on Adaptive Server:

    sp_configure 'enable dtm', 1
    
  3. Run the script sqlserver12.sql located in $SYBASE/$SYBASE_EJB/html/classes/sp.

  4. Grant the dtm_tm_role system role to the user in Adaptive Server:

    sp_role 'grant', dtm_tm_role, user_name
    
  5. Create the OTS/XA transaction log device in $SYBASE/$SYBASE_EJB:

    where server_name is the physical name of your EJB Server. If you do not create a log file, EJB Server will not start up.

  6. Shutdown and restart Adaptive Server.

StepsTo enable EJB Server for OTS/XA transactions:

Enable the EJB Server for OTS/XA transactions from the Adaptive Server plug-in:

  1. Highlight the EJB Server folder.

  2. Select File | Properties.

  3. Select the Transactions tab.

  4. Select OTS/XA Transactions.

  5. Press OK.