Hello Ralf & Others,
the full (template) message is "An open database instance ({0}) against database: {1} has been encountered. This instance will be closed now to release system resources. Please consider changing your code as well to enforce that all database connections are closed after use. SQL executed, but not closed: {2}"
I have found this message is raised by the finalizer of the DatabaseImpl class because the Database instance has not been explicitly closed by the client code.
We get around this problem with a worker thread which periodically closes any open databases that are inactive (from a transcation perspective).
I haven't used the CTF, but suspect the cleanup method(s) on the JUnit tests are not calling Database.close().
Tim.
+++
Tim Telcik
Technical Application Architect
Business Systems Delivery
Information Technology Services, HBF, Inc.
Email: [EMAIL PROTECTED]
Tel: 9214 6744 Fax: 9214 6779
| Ralf Joachim <[EMAIL PROTECTED]>
16/05/2005 03:28 PM
|
|
Hi Emir, Hi Nick,
I have recognized that too some time ago but did not find why this
happens as the test cases I checked properly close the database. I
wanted to have a look at this problem when switching CTF from JDO to
JDOManager at a futur refactoring.
Ralf
Nick Stuart schrieb:
> I've noticed this on MySQL as well. Was running them yesterday trying
> to add my own tests in...which still aren't running, but I'll hack
> around at that a bit more later. :)
>
> -Nick
>
>
> On 5/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>>Hi all,
>>I've tried running castor tests on SAPDB, Oracle and MS SQL and all of the tests have this "database not closed" warning from [Finalizer]!?! Why is this happening? Is this expected?
>>I've checked out last version, did "build tetsts", made an .xml with test configuration for every of the used databases (mssql.xml, oracle.xml and sapdb.xml) and then run each separately, e.g., "test.bat -file mssql.xml".
>>BTW, I've used ms jdbc drivers for mssql server and I've found some problems there, too. Will investigate further as soon as I have some more time and submit it to jira.
>>
>>
--
Syscon Ingenieurb�ro f�r
Me�- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstra�e 11
D-72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Email: [EMAIL PROTECTED]
Web: www.syscon-world.de
============================================================ HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. |

