Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Query Cancel(How to cancel a running Query with Eclipse)
Query Cancel [message #1083174] Fri, 09 August 2013 15:27 Go to next message
Clementi Ursula is currently offline Clementi UrsulaFriend
Messages: 6
Registered: July 2013
Junior Member
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 13:31 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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.


James : Wiki : Book : Blog : Twitter
Re: Query Cancel [message #1085890 is a reply to message #1085868] Tue, 13 August 2013 13:55 Go to previous message
Clementi Ursula is currently offline Clementi UrsulaFriend
Messages: 6
Registered: July 2013
Junior Member
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: Thu Apr 25 00:16:45 GMT 2024

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

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

Back to the top