Dear All

I'm experiencing a strange case of database locks not given up when locking rows through hibernate and using the cocoon database connection pool.
I've used the session factory from http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial to provide me with hibernate sessions.


Now the following happens:
A web user makes an http request during which more or less the following sequence is executed:


session = sessionFactory.createSession(); <-- that's the HibernateFactory
object = session.get(..., Lockmode.UPGRADE);
...
session.lock(object, Lockmode.NONE);
session.close();

(where the session.close() is done with the servlet filter as described in aforementioned tutorial).

This seems to lock the database up after a while [I suspect once the db connection pool run out of connections], the reason being me of course not reading the tutorial carefuly enough because session.close() is there infact (and correctly) session.connection().close().

After this, the locking works fine for multiple users hitting the same webapp.

However, when I run a second cocoon instance (on a different JVM, of course) unlocking is not propagated to the database. In particularily, since it's an Oracle db I can see the lock from the enterprise manager even way after unlock() and close() were executed.

I'm apreciating as always your thoughts on this :)

BR
G.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to