struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravi_eze <>
Subject Interceptors and Thread safety
Date Wed, 08 Jul 2009 13:08:28 GMT

hi, says that
interceptors are not thread safe, i wanted a deeper understanding on this.

1. Suppose i have 2 action tags each having an interceptor (I) referenced in
2. 2 action tags with interceptors referenced *twice in each* of them

If interceptors are not thread safe then how many instances of the objects
are created in the above cases. My common-sense says 2 & 4 objects

I have an interceptor which takes data from the struts.xml in the form of
params tags. The value of these param tags are held in the interceptor
class's field variables. I have this interceptor included in my struts.xml
as said in the case1 and 2 above. Now on concurrent requests do i get
threading issues? Please clarify.

Is it thread safe if i dont put the field variables related to the internal
processing of the class? i.e.. i have field variables only related to the
param tags only and nothing more. Now is the interceptor thread safe?

Kindly clarify.

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message