| Cancellation of parallel queries on server [message #916005] |
Tue, 18 September 2012 07:47  |
Samuel Messages: 1 Registered: January 2012 |
Junior Member |
|
|
There is a mechanism to cancel long running statements on the server.
The mechanism works as follows:
- Each SQL statement is put into a map of currently running statements before it is executed.
- After the execution, the statement is removed from the map.
The client can request a cancel of the currently executing server calls.
This can be done by clicking the cancel button on the bottom right of the application window that appears e.g. when a search is executed.
This works as long as the server call does not open its own threads.
However, when the server call opens its own threads (e.g. for parallel execution of database queries), the mechanism no longer works.
In our application, a server call opens own threads. Each thread executes a query as can be seen in the following code snippet:
Object[][] searchResult = ServerUtility.doScoutTransaction(
new RunnableWithException<Object[][]>() {
public Object[][] run() throws Throwable {
return execSearch(searchFormData);
}
},
serverSession.getClass(),
new Holder<IServerSession>(IServerSession.class,serverSession),
null
);
What is the recommended way to execute "interruptible" parallel queries on the server?
[Updated on: Tue, 18 September 2012 07:47] Report message to a moderator
|
|
|