• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scope prototype not being thread-safe

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
struts 2.1.8.1
spring 3.0.2
struts2-spring-plugin-2.1.8.1


Hello:

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" />
</property>
</bean>

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>
</action>


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

Any ideas would be appreciated.

Eric

reply
    Bookmark Topic Watch Topic
  • New Topic