- First the response:

Have a look that from Jakarta documentation:

http://jakarta.apache.org/struts/userGuide/building_controller.html#action_classes

"The controller servlet creates only one instance of your Action class, and 
uses it for all requests. Thus, you need to code your Action class so that 
it operates correctly in a multi-threaded environment, just as you must code 
a servlet's service() method safely.
The most important principle that aids in thread-safe coding is to use only 
local variables, not instance variables, in your Action class. Local 
variables are created on a stack that is assigned (by your JVM) to each 
request thread, so there is no need to worry about sharing them."

- And now the question:

In other places, they suggest to use a resources cache with a threshold 
managed by session. However, I have doubts about right performance in 
clustered environment, since when swapping JVM, caches are lost. Anyone has 
further experience with this issue. We are using Websphere in clustered 
round robin environment.

Adolfo

>From: Bhaskar Gopalan <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Group (E-mail)" <[EMAIL PROTECTED]>
>Subject: Managing bean
>Date: Mon, 15 Apr 2002 14:36:45 -0400
>
>Hi,
>I'm new to struts and have this question:
>
>I have a jsp that talks to a form bean. After successful validation, this
>formbean is
>passed to action.perform(). Now I am creating a bean (corresponding to a db
>row) in
>the action class using the data from the formbean. Now, where do I store
>this bean
>and how do I access it from the action class later? I guess only one
>instance of
>the action is created for all the sessions. So, I cannot store the bean as
>an
>instance variable of the action class.
>
>Thnx,
>GB
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to