struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramanathan RV" <ramanatha...@gmail.com>
Subject [Struts2]ExecAndWaitInterceptor and BackgroundProcess issue
Date Thu, 21 Aug 2008 08:19:23 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message