struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kimbuba" <>
Subject Doubt: how to handle Action threading?
Date Thu, 13 May 2004 17:39:42 GMT
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!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message