Perhaps, then, we simply leave ol' Action to go out to pasture, and simply make it easier to indicate that you want to use a command by using the flexible interpretation of "type" i outlined above. We could write an "ActionCommand" class which simply passed "execute(Context)" to "execute(ActionContext)", for those who wanted it (like I kind of do for all of our existing commands), but since ActionContext extends Context, the only requirement would be that "type" refer to an instance of *either* Action*or* Command. We could leave in the catalog/command syntax for people who have reason to specify by name instead of by class name (particularly when they want to use a chain instead of a single command.)
We can create an interface for Action w/o deprecating Action itself. I don't have a problem keeping Action around (in fact, since we are sticking with the 1.x naming, we pretty much have to), but we should take this opportunity and remove its dependency in Struts core. Action would still be around for those that want to use it as their base class.
I don't really care about deprecating Action, but if the new interface specifies "execute(ActionContext)", then Action's "execute(ActionMapping,ActionForm,HttpServletRequest,HttpServletResponse)" method should be deprecated, no? I suppose it's not as simple as that, but it seems weird to me not to make the direction clear.
FWIW, I think Frank's idea of supporting POJO's as actions is the best. The JSF model of "action" is, IMO, the way to go:
1. It is a POJO that doesn't have to extend or implement anything
2. It can have properties for simple pages that don't need separate forms
3. It can be scoped so this silly "threadsafe" thing can go away, and scoping at a session level even opens up new interesting possibilities.
I've been thinking about this too, and I have no objection -- but would someone care to propose a config syntax for it? Would it be yet another "overload" of the "type" attribute? (Fine with me; how to specify which method gets called?) And how would the properties be populated? (item 2)
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]