I have a couple of simple questions hopefully someone can clear up my confusion.
1. I have an SQLQuery object which I have setTimeout(5). Instead of timeout at 5 seconds, it printed a message at 5 minutes
2007.10.24 16:01:53,399 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1193265661772/37, BranchQual=null:1193265661772, localId=0:37] timed out. status=STATUS_ACTIVE
However, the query does not terminate. The query is pretty simple, just a few inner joins between a few tables to get a result set. I would expect when the timeout occur, the query will end with an exception but it didn't. What my expectation wrong?
2. I called cancelQuery() on a session object from a different thread where another thread is executing a long query from the same session object. The cancelQuery() executed without any exception but the active query does not end right away with an exception. Shouldn't it?
I am using hibernate 3.2.1. Thanks for any clarification or insights.
|