Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Query Cancel(How to cancel a running Query with Eclipse)
Query Cancel [message #1083174] Fri, 09 August 2013 11:27 Go to next message
Eclipse UserFriend
Hi,

our programm allows the user to generate his own search criteria for querys.
Sometime the users generate complex queries on great tables, which will never end and the they whant to cancel them.

Is there any possiblity to do something like this ?

ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(MyClass.class);
query.setSelectionCriteria(myComplexExpression);

vector = clientSession.executeQuery(query);
.... zzzz at this point the thread hangs

We have saved the runningQuery in a QueryManager.
There we want to cancel the query.

/*------------------- */
/*now cancel */
query.cancel()


Thanks al lot.


Ursula Clementi
Re: Query Cancel [message #1085868 is a reply to message #1083174] Tue, 13 August 2013 09:31 Go to previous messageGo to next message
Eclipse UserFriend
You can set a query timeout on a query, but there is no cancel API.

You may want to provide a default timeout, or let your user to pick the timeout.

If you need a cancel API, please log an enhancement request and vote for it.
Re: Query Cancel [message #1085890 is a reply to message #1085868] Tue, 13 August 2013 09:55 Go to previous message
Eclipse UserFriend
Thank's for the information.
We cannot set a timeout, because sometimes the query need a long the time and it should not be canceled.
Isn't it possible to get the prepared Statement from the query and then set the cancel command by my own ?
Previous Topic:Log Rotation
Next Topic:commonj.sdo plugin is unsigned (moved from platform forum)
Goto Forum:
  


Current Time: Sun Nov 02 10:17:51 EST 2025

Powered by FUDForum. Page generated in 0.03806 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top