-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: cancelQuery is not valid without active transaction
PostPosted: Fri Nov 03, 2006 1:51 pm 
Newbie

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.