I have a similar hierarchy, with a base action providing generic services like VO manipulation, security methods, exception manipulation, and framework interaction, and in general I pass everything as parameters. This is mitigated by the fact that the action classes simply adapt the input to the backend, the pass everything off. In other words, the actions don't really do much aside from act as a glue layer.

This is really a combination of both concepts you've listed. The local methods provide the generic action services, and the processing for the request is actually done by handing everything off to other objects, which handle their own synchronization issues.

I would say you're on the right track.

kimbuba wrote:

Hello i have the following doubt.
Actions are multithreaded.
That means that more than one thread can access the same action.
Therefore a class that extends an Action cant' use instance members without
appropriate synch.


I have the following doubt: i have specialized subclasses hierarcy of Action class; each one with more than one method.

I guess two soultions:
1) do a subclass hierarcy  with no instance members so evrything is passed
as a local method field with no synch issues. (i could even declare all
methods static )
2) do 2 classes: one that subclass Action but under the execute method it
will instantiate a new Object and execute it's own "run" method.
Doing that way the new Object will haver no synch issues.

I'm interested on what kind of solutions have you adopded.

thnx a lot!

kimbuba.




--------------------------------------------------------------------- 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