FIX: Java Client Using an MTS/Java Server Hangs During GC (192385)



The information in this article applies to:

  • Microsoft SDK for Java 3.0
  • Microsoft SDK for Java 2.0
  • Microsoft SDK for Java 2.01
  • Microsoft SDK for Java 2.02

This article was previously published under Q192385

SYMPTOMS

When using a Java client to interact with a Microsoft Transaction Server (MTS) object that is also implemented in Java, the process may deadlock when garbage collection (GC) occurs.

CAUSE

A GC bug caused a hang when the GC heap was greater than 16 megabytes (MB) and was trying to grow.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in the Microsoft virtual machine for Java (Microsoft VM) build 2907 or later. For more information about the latest version of the Microsoft VM and about Java developments at Microsoft, visit the following Microsoft Web site:

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Install the MTS hotfix mentioned in the following article in the Microsoft Knowledge Base on your computer:

    180468 BUG: Java Components Hang When Run in Transaction Server

  2. Create a simple Java class and package it up as an MTS server component.
  3. Install the Java class into a package and set the package activation type to Library Package instead of the default (Server Package). This changes the server type from LocalServer to InprocServer and changes the threading type to "Free."
  4. In the implementation of the Java client, call System.gc() after using the MTS/Java component, and ComLib.release()ing it.
When running multiple instances of the Java client the process will hang.

REFERENCES

For the latest Knowledge Base articles and other support information about Visual J++ and the SDK for Java, see the following pages on the Microsoft Product Support Services Web site:

Modification Type:MinorLast Reviewed:11/17/2005
Keywords:kbbug kbfix kbJava KB192385