As for intercepting transactions, I would say have a key that is set in the context which tells the after() part of the Tx interceptor what to do. Kind of like setting rollbackOnly on a UserTransaction. Assume that the transaction should be committed unless an exception is caught or rollbackOnly is set on the ActionContext.
> -----Original Message----- > From: Patrick Lightbody [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 10:24 AM > To: os-ww > Subject: [OS-webwork] XWork Interceptors > > > So anyway, I'm just going to disregard the "Documentation" > thread and start a thread that is actually useful :) > > (Though, Ken, we're still hoping your willing to do some Doc work!) > > So besides Action Chaining, Rickard made a good point that > interceptors is very important as well. I'd like to talk > about the actual implementation now -- using the transaction > scenario as an example. > > How will the interceptor know when to rollback or commit? Of > course on an Exception it should, but what about on ERROR or > INPUT? What if the action, to signify it's is complete, used > COMPLETE instead of SUCCESS? Do you see my point? How can we > make interceptors work for all cases? I'm guessing some sort > of configuration is needed for each interceptor on each > action, so we could do something like: > > <interceptor class="..."> > <param name="commit.values">success, complete</param> > </interceptor> > > And then the interceptot could know to rollback if the return > value isn't one of those two. > > Rickard, is this what you had in mind? > > Also, Interceptors would fit in to the GenericDispatcher > area. I think that they would replace ActionFactoryProxies > entirely, correct? Also, maybe Rickard you can provide some > sample psuedo code for an Interceptor as well as how it would > go about being invoked in GenericDispatcher? > > -Pat > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something > 2 See! http://www.vasoftware.com > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork