Hi James, The Struts controller (ActionServlet) is responsible for creating Action instances and creates just one per Action handler defined in the struts config file. This behaviour is intentional and will not change. I have written a number of web-apps using Struts that are accessed by a large number of users simultaneously and this has not caused a problem. You just have to ensure that your execute method (perform is deprecated) is thread safe.
Regards Jim. ----- Original Message ----- From: "James Higginbotham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 19, 2003 3:27 AM Subject: Struts Admin Example not threadsafe? Hi, I am attempting to start using the struts admin example as a starting point for building out a UI for my users to browse and eventually edit content via the web. I noticed that the struts admin classes all extend the base AdminAction.java class. In that class, the perform() method initilaizes the access token, a protected field, and returns null (allowing the subclass to process the request properly). Did the original author not know that Struts utilizes an internal cache and manages only 1 instance of an action? Thus, the entire admin example is useful for a single admin to use, but isn't threadsafe to either build upon or deploy and expect multiple users or admins to work with it at once. I wanted to mention this for 2 reasons: 1) to ensure others that may be doing the same thing as I will notice this issue, and b) to find out if the original author was planning to fix this for future developers that may not be as familiar with the Struts design and want to use it as a starting point as I am. Regards, James --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
