Hello,

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?

-- 
Thanks
Ram

Reply via email to