On 1/6/06, Hubert Rabago <[EMAIL PROTECTED]> wrote: > > On 1/6/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > ...all of which raises a question that I don't know the answer to... > does > > Struts 1.3 pool Commands? I.e., if I implement my Actions as Commands, > do > > I get that per-request functionality I want? If so, that is at least a > > step in a good direction. > > IIRC, Craig implements Commands the way he did Actions, so there's one > instance of it for the whole app (per jvm, etc, you know what i mean).
That's what the default Commons Chain imlementation does, so that's what the current 1.3 code does ... if you don't want that, use a different implementation of org.apache.commons.chain.Chain :-). On the other hand, if you're using the CoR design pattern, all your state information should be in the Context object that gets passed around, not in instance variables in a Command instance. Therefore, you shouldn't *want* to have multiple instances of the command classes. Put the per-request state information in the context (or approprately organized in a session scope attribute) where it belongs. Craig