FIX: Multithreaded Java Applications Using ADO Fail with Access Violation (291545)
The information in this article applies to:
- Microsoft Data Access Components 2.6
- Microsoft SDK 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.
RESOLUTIONTo 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
STATUSMicrosoft 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.
Modification Type: | Minor | Last Reviewed: | 9/26/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbMDAC260sp1Fix kbQFE KB291545 |
---|
|