Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Multiple two-phase commit Transaction Integrator calls in an overall distributed transaction fail in Host Integration Server 2004


View products that this article applies to.

Symptoms

Consider the following scenario. In Microsoft Host Integration Server 2004, you make multiple two-phase commit (2PC) Transaction Integrator (TI) calls in the context of an overall distributed transaction. In this scenario, the second TI call fails, and you receive an error message.

Note The error message text varies. One possible error message that you may receive is similar to the following:
System.Runtime.InteropServices.COMException (0x000005DC): (1500) The output buffer size has been exceeded while processing parameter ParameterName in method MethodName.

↑ Back to the top


Cause

This problem occurs because the TI runtime sends incorrect input data to the host on the second TI call. The error message that you may receive depends on how the host program responds to the incorrect input.

↑ Back to the top


Resolution

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Host Integration Server 2004 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
File nameFile versionFile sizeDateTimePlatformService pack requirement
Capture.dll6.0.1989.025,60007-Oct-200522:32x86SP1
Dcgen.dll6.0.1989.098,81607-Oct-200522:32x86SP1
Microsoft.hostintegration.ti.dcgen.interop.dll6.0.1701.04,09607-Oct-200522:32x86SP1
Mobase.dll6.0.1989.0249,34407-Oct-200522:31x86SP1
Playback.dll6.0.1989.024,06407-Oct-200522:32x86SP1
Tagen.dll6.0.1989.094,72007-Oct-200522:32x86SP1
Turnaround.dll6.0.1989.034,30407-Oct-200522:32x86SP1
Note Because of file dependencies, the most recent fix that contains these files may also contain additional files.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

This problem only occurs when multiple TI calls are made in an overall distributed transaction. To use Microsoft Visual C# .NET to set up a project that makes two TI calls in an overall transaction, follow these steps:

Note These steps assume that the following conditions are true:
You know how to create, install, and make calls to TI Microsoft Component Object Model (COM) objects by using Microsoft Visual Studio .NET.
The environment is already set up for 2PC, and the following conditions are true:
The HIS LU62 Resync Service is started.
The application event log shows that a successful log name exchange (XLN) has occurred (Event 119).
1.Create the TI COM objects, and then install the objects by using TI Manager.

Notes
Make sure that the Transaction Support setting for the TI component is set to Supported.
For this example, the method property Include Context Parameter is set to False.
For the code example in step 11, the two TI COM objects use the LU 6.2 Link model. The objects are named LinkA.Test and LinkB.Test. The LinkA.Test object contains the MyMethodA method, and the LinkB.Test object contains the MyMethodB method.
2.Open the Visual Studio .NET Command Prompt. To do this, click Start, click All Programs, click Microsoft Visual Studio .NET 2003, click Visual Studio .NET Tools, and then click Visual Studio .NET 2003 Command Prompt.
3.Locate the application folder for the console application.
4.Type the following commands:
sn -k TI_Tran.snk
sn -k TI_COM.snk
Notes
The TI_Tran.snk command signs the assembly with a strong name.
The TI_COM.snk command signs the TI COM objects by using a strong name.
5.Create a new C# console application in Visual Studio .NET by using the following references:
The TI COM objects
The System.EnterpriseServices namespace
6.In Solution Explorer, rename class1.cs to TITran.cs.
7.In the AssemblyInfo.cs file, comment out the following two lines of code.
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
8.For the console application, click Properties on the Project menu.
9.Under Common Properties - General , type TI_COM.snk in the Wrapper Assembly for ActiveX/COM Objects - Wrapper Assembly Key File box.
10.Delete all the code in the TITran.cs file.
11.Add the following code to the TITran.cs file.
using System;
using System.EnterpriseServices;
using System.Reflection;

[assembly: ApplicationName("TI_Tran")]
[assembly: AssemblyKeyFileAttribute("..\\..\\TI_Tran.snk")]


namespace TI_Tran
{
   /// <summary>
   /// Example of having two TI transactional method calls
   /// within one overall rransaction.
   /// </summary>
   class TI_Tran
   {
      /// <summary>
      /// The main entry point for the application.
      /// </summary>
      [STAThread]
      static void Main(string[] args)
      {
         Console.WriteLine("Starting program");
         TI_TranClass myTI_Tran = new TI_TranClass();
         string sOut;
         try
         {
            sOut= myTI_Tran.TestTI_Transaction();
            Console.WriteLine(sOut);
            Console.Write("Press ENTER to exit");
            Console.ReadLine();
         }
         catch (Exception ex)
         {
            Console.WriteLine("\nException occurred calling TI_Tran\n");
            Console.WriteLine(ex.Message);
            Console.Write("Press ENTER to exit");
            Console.ReadLine();
         }
      }
   }
   /// <summary>
   /// The following application makes two different TI calls to a mainframe.
   /// The calls are set up as two-phase commit calls and will be
   /// either committed or aborted.
   /// The TI objects are HIS 2004 TI COM LU6.2 Link objects
   /// </summary>
   [Transaction(TransactionOption.Required)]
   public class TI_TranClass: ServicedComponent
   {
      public TI_TranClass()
      {
      }
      [AutoComplete]
      public string TestTI_Transaction()
      {
         string sRetInfo = "Done - ";
         LinkA.TestClass objTIA = new LinkA.TestClass();
         LinkB.TestClass objTIB = new LinkB.TestClass();
         try
         {
            Console.WriteLine("Begin Test Tran");
            string sInput="AAAAAAAAAAAAAAAAAAAAAAAAA", sCommit;
            decimal dBal;
            Console.WriteLine("About to call first Link TI Method");
            objTIA.MyMethodA(ref sInput, out dBal);
            Console.WriteLine("Finished with first Link TI Method Call: " + dBal.ToString());
            sInput = "BBBBBBBBBBBBBBBBBBBBBBBBB";
            Console.WriteLine("About to call second link TI Method");
            objTIB.MyMethodB(ref sInput, out dBal);
            Console.WriteLine("Finished with second link call: " + dBal.ToString());
            Console.WriteLine("  sInput = " + sInput);
            Console.Write("Shall we commit? (Y/N): ");
            sCommit = Console.ReadLine();
            if ((sCommit == "Y") || (sCommit == "y"))
            {
               Console.WriteLine("Committing");
               ContextUtil.SetComplete();
               sRetInfo = sRetInfo + "Committed";
            }
            else
            {
               Console.WriteLine("Aborting");
               ContextUtil.SetAbort();
               sRetInfo = sRetInfo + "Aborted";
            }
         }
         catch (Exception ex)
         {
            //Something wrong occurred on the TI call.
            //An exception was thrown.
            //This class may want to post an application event
            //then re-throw the exception so the calling application can
            //capture it.
            throw ex;
         }
         finally
         {
            objTIA = null;
            objTIB = null;
         }
         return sRetInfo;
      }
   }
}
For more information about how to set up distributed transactions in Visual Studio, click the following article number to view the article in the Microsoft Knowledge Base:
316247 How to perform a distributed transaction with a .NET provider by using ServicedComponent in Visual C# .NET

↑ Back to the top


Keywords: KB909256, kbpubtypekc, kbbug, kbfix, kbhis2004, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 909256
Revision : 3
Created on : 7/26/2006
Published on : 7/26/2006
Exists online : False
Views : 365