You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Chaikin, Yaakov Y (US SSA)" <ya...@baesystems.com> on 2003/12/07 18:31:17 UTC

Lock on database file not being released...

Hi,

I am having a problem where the lock on the database is not being
released. I am using database connection pooling and I am just running a
test app and certainly DO close my connections. I double checked that
the code that closes the connection is being called and it is.

What other things can I check or might be doing wrong?

I am using the M$ Access as the database and the odbc bridge driver to
get to it.

When I shut down the server I would expect that the database pooling
releases all its connections. It does look like it though, since I still
still the databaseName.ldb file in that directory (MS Access way of lock
the database file).

I know that Sun says that it is not production level driver. However, I
have used this driver before in a standalone app and when you close a
connection, it certainly does release the lock on the database file.
This leads me to believe that it's NOT the driver problem, but my
configuration problem.

I am attaching the server.xml file just in case that would help in
solving the problem.

I would really appreciate any help.

Thank you.

Yaakov Chaikin
Software Engineer
BAE SYSTEMS
301-838-6899 (phone)
301-838-6802 (fax)
yaakov.y.chaikin@baesystems.com



RE: Lock on database file not being released...

Posted by George Sexton <gs...@mhsoftware.com>.
A common problem in beginner JDBC is not performing a ROLLBACK when an
update fails. Even when autocommit is set to TRUE, a failed update will
leave the records locked in the database. Update statements should
always be coded so that if an exception is thrown, a rollback is
performed on the connection.

-----Original Message-----
From: SH Solutions [mailto:info@sh-solutions.de] 
Sent: Sunday, December 07, 2003 10:51 AM
To: 'Tomcat Users List'
Subject: AW: Lock on database file not being released...


Hi

> However, I have used this driver before in a standalone app and when
you
close a connection, it certainly does release the lock on the database
file.

This makes me think, you didn't use pooling in this standalone app.
Therefor
check weather you close all your ResultSets and Statements. In
standalone
apps where no pooling is involved, they are caught by the garbage
collector,
but not in connection pooling.

Trapped into this myself.

cu
  Steffen


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


AW: Lock on database file not being released...

Posted by SH Solutions <in...@sh-solutions.de>.
Hi

> However, I have used this driver before in a standalone app and when you
close a connection, it certainly does release the lock on the database file.

This makes me think, you didn't use pooling in this standalone app. Therefor
check weather you close all your ResultSets and Statements. In standalone
apps where no pooling is involved, they are caught by the garbage collector,
but not in connection pooling.

Trapped into this myself.

cu
  Steffen


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org