Microsoft KB Archive/291545

= FIX: Multithreaded Java Applications Using ADO Fail with Access Violation =

Article ID: 291545

Article Last Modified on 9/26/2005

-

APPLIES TO


 * Microsoft Data Access Components 2.6
 * Microsoft Software Development Kit for Java 3.0

-



This article was previously published under Q291545



SYMPTOMS
Multithreaded Java applications that use ActiveX Data Objects (ADO) to open, query, and close connections on each thread will experience an access violation (AV) after a large number of threads have been created and destroyed. The AV usually occurs when more than 100,000 threads have been created and destroyed.



CAUSE
This problem occurs when an ADO Recordset object is being garbage-collected by a different thread than the one it was created from. When the ADO connection object is being closed, it tries to free the memory for its Recordset object. The ADO connection object has inadvertently gotten hold of a Recordset object from another thread and frees that object, and the garbage collection process tries to clean it up, which causes the AV.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack

Hotfix
The English version of this fix should have the following file attributes or later:

  Date      Time    Version      Size    File name     Platform -  02/09/01  4:35P   2.61.7209.0  528,656 Msado15.dll   i386



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.

Additional query words: ADO OLEDB Java

Keywords: kbbug kbfix kbqfe kbmdac260sp1fix kbhotfixserver KB291545

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.