> -----Original Message----- > From: Rickard Öberg [mailto:[EMAIL PROTECTED] > > Well, that's a damn good question :-) One could argue that an > invocation > should be created immediately upon creation of actionproxy, and when > it's invoked then the reference to it is "lost" so that any > subsequent > calls to get the action (from the wrapped invocation) would get a new > invocation/action. Perhaps not a perfect solution, but it > would give us > all the right semantics (I think).
Ok, here's what it does now... Code calls ActionProxy proxy = ActionProxy.createActionProxy("namespace","actionName",extraContext), where extraContext is a Map of... Yeah, extra context. This immediately creates an ActionInvocation with the ActionConfig found using the namespace and actionName and the extraContext. However, the lifecycle issues were too much complexity for the small added benefit of re-using the ActionProxy, so ActionProxy's can only be executed once. ActionInvocations are now hidden behind the ActionProxy and no longer used by outside code at all. ActionProxy's ended up being VERY helpful for implementing ActionContext nesting and should simplify calling Actions programmatically. It also, along with an ActionProxyFactory (left as an exercise for the reader? :-)) could be very helpful for things like remote action invocation, etc. > > > After the execute on > > the ActionProxy, should the ActionInvocation still be > available? All > > in all, I was more sure of this design before I started doing it :-) > > After the invocation the the invocation should be thrown away > (I think). > > As you said, it's really only once you start doing it that all these > problems emerge. Keep doing it and we'll take the issues as > we go along. > > /Rickard > It didn't turn out to be worth it to try to make ActionProxy's reusable. Is there a serious reason they should be? Jason ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork