Working to many hours, not enough thinking. Sorry For the question. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 1:45 PM Subject: RE: ActionBeans
Is dataList an instance variable or is it defined within your Action's perform() or execute() method? > -----Original Message----- > From: Daniel Jaffa [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 1:40 PM > To: [EMAIL PROTECTED] > Subject: ActionBeans > > > Ok, I just read this in the api > > An Action is an adapter between the contents of an incoming > HTTP request and the corresponding business logic that should > be executed to process this request. The controller > (ActionServlet) will select an appropriate Action for each > request, create an instance (if necessary), and call the > perform method. > > Actions must be programmed in a thread-safe manner, because > the controller will share the same instance for multiple > simultaneous requests. In this means you should design with > the following items in mind: > > a.. Instance and static variables MUST NOT be used to store > information related to the state of a particular request. > They MAY be used to share global resources across requests > for the same action. > b.. Access to other resources (JavaBeans, session > variables, etc.) MUST be synchronized if those resources > require protection. (Generally, however, resource classes > should be designed to provide their own protection where necessary. > > so does this mean that if in my action I have code like this > > > ArrayList dataList= new ArrayList(); > dataList = com.cci.dv.beans.loadData.loadDisplayBean(conn, > theFormBean, getParamArray()); > > Will I have data integrity issue because dataList is an > Instance variable > > Daniel Jaffa > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>