Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scope prototype not being thread-safe

John Eric Hamacher
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
spring 3.0.2


I have a web application where at times, users will "see each other's sessions". The only thing that seems possible is that the instances of actions I have defined are being shared by multiple users, even though I have given each scope="prototype". Here is a sample action:

<bean id="summaryAction" class="xxx.yyy.SummaryAction" scope="prototype">
<property name="xxxxAPI">
<ref bean="xxxxAPI" />

Each Action in the applcation subclasses a base action which also has scope="prototype" set.

Here is the relevant entry from struts.xml:

<action name="summaryRefreshMain" class="summaryAction" method="refreshMainPage">
<param name="privilege">XXXX</param>
<result name="success" type="tiles">/summaryMain</result>
<result name="input" type="tiles">/summaryMain</result>

The Actions do not reference each other in any way or store session values in a stateful way.

Any ideas would be appreciated.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic