db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Newsham" <jnews...@referentia.com>
Subject RE: Chat program using derby
Date Tue, 19 Feb 2008 20:25:41 GMT
> when i run both the programs:i get the following exception:mhjfdshmnjh
> java.sql.SQLTransactionRollbackException: A lock could not be obtained
> within the time requested

The problem is that database writes in one client acquire row or table
locks, which prevent the other client from accessing those same records
until the transaction has been committed.  In your case, the transactions
are never committed.

I would suggest not disabling auto-commit.  However, if you prefer to
disable auto-commit, make sure you commit your transactions promptly when
you are finished accessing the database.

Jim



Mime
View raw message