cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From george georgovassilis <>
Subject Re: Hibernate, cocoon db connection pooling & row locks
Date Tue, 07 Dec 2004 08:57:38 GMT
Dear All
Sorry to bother you again. I think I got it sorted out now. The 
hibernate forum finally provided the answer and it's not a 
coocon-db-pool related issue but simply a wrong using of transactions on 
my side. So, sorry again for the fuss.


> 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 
> 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message