Ramanathan RV wrote:
I seem to have hit an issue with using ExecAndWaitInterceptor because of the
way it is designed. The background process is invoked in this fashion:
* public void run() {
try {
beforeInvocation();
result = invocation.invokeActionOnly();
afterInvocation();
} catch (Exception e) {
exception = e;
}
done = true;
}
*I am using afterInvocation to cleanup certain thread local managed
resources that were used by the action. What this means is that if there is
any exception in the course of action invocation, then I have no way to
clean up the resources.
I am sorry but I am left with no other option except to blame the design. It
was preposterous to have the thread invocation in the constructor. I have
absolutely no way to redefine the behaviour now. Please do refactor this
code so that it is really usable. Should I file a bug for the same?
It sounds like this should be:
try {
beforeInvocation();
result = invocation.invokeActionOnly();
} catch (Exception e) {
exception = e;
} finally {
afterInvocation();
done = true;
}
Can you test this variation and if it works for you (and doesn't break
any of the test cases) submit a ticket/patch with it?
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]