I want to stop a long running query in Oracle + Hibernate 3 + Java.
I have tried setting the timeout using the code snippets below, without success.
1.
query = session.createQuery("from table");
query.setTimeout(1000);
list = query.list();
2.
Transaction tx = session.getTransaction();
tx.setTimeout(1000);
tx.begin();
query = session.createQuery("from table");
list = query.list();
Could anyone please help me on this?
Thanks in advance.