Be shure that your web beans are marked scope="propotype" in the
spring configuration files; that makes spring create a new bean each
time you need one instead of providing a pointer to the existing
instance.
Spring defaults to singletons so don't mark prototype things like DAOs
or service classes that don't have persistence state between methods.


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Sat, Jul 26, 2008 at 23:04, Arun M <[EMAIL PROTECTED]> wrote:
>
> Yes , we are using spring and hibernate also along with struts.
> Could you suggest us, where to configure to resue the beans ??
>
>
> Piero Sartini-3 wrote:
>>
>> Struts2 does create a new Action for every request.
>> Do you use Spring? I think you can configure it to reuse the beans...
>>
>>       Piero
>>
>> Am Samstag, 26. Juli 2008 19:48:47 schrieb Arun M:
>>> We are using struts 2.0.11
>>>
>>> We have lots of action class. Say one of them is CustomerRegisterAction
>>> (which extends ActionSupport  ) . When a say user  X registers himself on
>>> the website; this CustomerRegisterAction is populated (using OGNL) and
>>> the
>>> customer data is saved to DB. But after sometime some other user Y from
>>> some other PCcomes and clicks the Register link, then the data entered by
>>> X
>>> is prefilled now.
>>>    I think the CustomerRegisterAction is reused, instead of creating new
>>> instance every request.  we want to setup such that new
>>> CustomerRegisterAction is created every httprequest, so that data is not
>>> leaking between users.
>>>
>>> Please help us.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Data-Leakage-in-Struts-2-tp18669314p18673188.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to