Issue Details (XML | Word | Printable)

Key: WW-813
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Patrick Lightbody
Reporter: Jim Van Fleet
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Make ExecuteAndWaitInterceptor easier to extend

Created: 02/Aug/05 04:39 PM   Updated: 06/Aug/05 12:21 PM
Component/s: Interceptors
Affects Version/s: 2.1.7
Fix Version/s: 2.2

File Attachments: 1. Java Source File BackgroundProcess.java (2 kB)
2. Java Source File BackgroundProcess.java (2 kB)
3. Java Source File ExecuteAndWaitInterceptor.java (3 kB)

Environment: N/A
Issue Links:
Related
 

Flags: Patch


 Description  « Hide
The ExecuteAndWaitInterceptor was difficult to extend with user-provided background processes, and those background processes themselves were difficult to modify. This patch can alleviate both.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jim Van Fleet added a comment - 02/Aug/05 04:40 PM
The two source files needed for the patch. BackgroundProcess is a new class.

Patrick Lightbody added a comment - 03/Aug/05 07:52 AM
Jim, this is committed -- but can you helping out with the documentation effort? Basically, anything that is new, can you make sure it is in the docs for this interceptor?

Jim Van Fleet added a comment - 03/Aug/05 08:32 AM
Sure thing. Name all the places you want me to put something. I'll head over to the wiki, now.

For JavaDoc, Is the JavaDoc sufficient? I think I may have missed a new method or two.


Jim Van Fleet added a comment - 03/Aug/05 09:11 AM
This is the real attachment. Sorry, the other one was from a test.

Jim Van Fleet added a comment - 03/Aug/05 10:13 AM
Patrick,

I think that beforeInvocation() needs to happen inside the thread's run() method. Otherwise any ThreadLocal-based functionality that beforeInvocation() uses will not get a chance to bind the thread running the background process. Is there something I'm missing as to why the beforeInvocation() is better placed outside?

Also, I am pretty sure that the result field needs to get the result of action.execute() as the ExecuteAndWaitInterceptor will later return that value as the result; it will be null otherwise.