Joined: Wed Mar 15, 2006 10:56 am Posts: 8 Location: Ohio USA
|
Hi all,
I am trying to implement the cancellation of the query using hibernate.
Here is the scenario.
1) user gives a request from the web page for execution of a query.
2) after 10 secs he cancels that query.
When i implemented the session.cancelQuery() I get the above stated message.
Here is the code snippet to cancel the query I have written. Point me where am I doing some thing wrong.
SessionFactory sessionfactory = HibernateSessionFactory.getInstance().getSessionFactory(hibernateConfig);
Session session = sessionfactory.getCurrentSession();
session.cancelQuery();
Exception happened while cancelling:org.hibernate.HibernateException: cancelQuery is not valid without active transaction
I am using JBoss4.0.3SP1 and transbase as the database.
|
|