Well, however, isn't it true that the common variety was created for this. This reminds me of the librarian who said she could not remain open an extra five minutes for me because of the rules. Upon examination, she authored and enforced the rules.
On 1/6/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > 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 > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~