Might I suggest, and not to toot my own horn or anything, but if you are going to launch a chain manually from an Action and not use what 1.3 provides, you might want to look at the chain implementation in Java Web Parts:

http://javawebparts.sourceforge.net/javadocs/javawebparts/misc/chain/package-summary.html

...and related...

http://www.metalstorm.ee/bands/view_albums.php?band_id=queensryche

I believe it provides some capabilities Commons Chain doesn't, and is otherwise different in some ways that you may (or may not!) like.

I'm not saying replace Commons Chain in 1.3 with this by the way, Commons Chain is perfectly fine IMO, but if anyone is essentially going to go off and do chains on their own, as I have done using Struts 1.2.6 for example, this alternate implementation might be worth a look.

Frank

Wolfgang Gehner wrote:
Here is a non-committer speaking (me): The CoR stuff is great as it is. We have used it in production since mid last year. I have written an article a year ago to tell people how great it is, and how we use Commands instead of Actions (read up if you like http://www.infonoia.com/en/content.jsp?d=inf.05.06).

Struts has a long history of betas being used in production (I remember very large sites using 1.1b3 (or was it b2) in production, without me telling them to).

I also believe that "Action" is a bit "flat" of a name for the greatness of 1.3. I could have done with "Struts CoR".

But at this point, JUST GET IT OUT THE DOOR, PLEASE.

FYI, we don't use actions any more, we use commands (in a chain, with chain-config files). But the framework lets us do both, even in one request. So Paul, if you believe that your chain must start in an action, go ahead, you can do it today.

In your (base?) action, just do
Catalog catalog = (Catalog) req.getSession().getServletContent().getAttribute("catalog");
Command command = catalog.getCommand("myChain");
boolean stop = command.execute(new ContextBase());
//or command.execute((Context) context);
Then do with the response what you want. We like passing the ServletActionContext through; we even fill the Struts Chain with our own augmented one that extends ServletActionContext :-)
Very clean and simple code is the result.

And the 1.3 release code it is great as it is!

Wolfgang Gehner
www.infonoia.com





Paul Benedict wrote:

Of course, some people are already using what
we already have in  production, so we need to be careful.

Ted, I am really surprised to hear this. Whose fault is it
to be using alpha/beta quality code in production? Certainly not
your fault, or any commiter's fault, except the fault of the
developer who thought that bleedging edge technology would
stop bleeding before it was released.

A couple days back, Dakota Jack replied to something similar
because you've expressed this sentiment before. He said that
it's better to do things correctly than to have hasty releases.
I 10,000% agree with him.

You shouldn't feel compelled to prevent breaking people's
production code with alpha/beta level software. Really, it
isn't your responsiblity to support non-production releases.
That's a bad gamble on their part and that has nothing to do
with you.

So I hear at least one Committer (maybe three?) are using
Struts 1.3 in production, but they must own THEIR decision
and deal with the consequences with using unreleased software.
They should get no more deference than any other Struts user,
and I hope you don't have them in mind when you're thinking
about not breaking non-released code.

Please, let's do things "the right way" by refactoring
unreleased software (even it breaks the early adopters) as necessary, and not breaking released software. That sounds
like a winning strategy to me.

Paul

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to