Sorry.. I meant to say that I was starting from the *Slide admin struts application* (not the struts admin application), which shares essential user-specific access tokens via a field in the action rather than creating it within the execute method (which would be on the stack of the request thread). Thus, the admin example is not threadsafe per the struts design and I was providing a warning for those that may be starting an application using the *slide admin* example using struts.
Hope this clarifies things a little more.. Man, too many Jakarta projects to keep track of in a single email ;) Best Regards, James > -----Original Message----- > From: Jim Collins [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 19, 2003 2:16 PM > To: Slide Users Mailing List > Subject: Re: Struts Admin Example not threadsafe? > > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
