I have a difficult JSF issue I am trying to solve. Note, I am fairly new to JSF and Java....I have a simple application where users login, select some checkboxes, click submit, add some more info on another page, save to DB and logout.
In my Production env, I am seeing instances where user session data is getting crossed or cached and pickup by a subsequent user session. For example, User A enters data, then User B enters data and upon reviewing his data, he sees stuff User A entered. Of course, I cannot recreate this in test.
I am using jsf 1.2._12, richfaces 3.3.2, and spring 2.5.6. The app server is JBoss 5.
All of my JSF managed-beans are session scoped. This particular managed bean calls a spring bean as my Business object which is session scoped, which ultimately calls a DAO that is singleton.
Here the relavant faces-config info
<managed-bean>
<description>ContactBean</description>
<managed-bean-name>ContactBean</managed-bean-name>
<managed-bean-class>com.package.ContactBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>dataElementBO</property-name>
<value>#{dataElementBO}</value>
</managed-property>
<managed-property>
<property-name>attributeBO</property-name>
<value>#{attributeBO}</value>
</managed-property>
<managed-property>
<property-name>dataElement2BO</property-name>
<value>#{dataElement2BO}</value>
</managed-property>
<managed-property>
<property-name>submissionBO</property-name>
<value>#{submissionBO}</value>
</managed-property>
<managed-property>
<property-name>selectedList</property-name>
<property-class>java.util.ArrayList</property-class>
<list-entries />
</managed-property>
<managed-property>
<property-name>enteredContact</property-name>
<property-class>java.util.ArrayList</property-class>
<list-entries />
</managed-property>
</managed-bean>
And my app-Context for the spring bean getting called
<bean id="submissionBO" class="com.package.submissionBOImpl" scope="session">
<property name="submissionDAO">
<ref bean="submissionDAO" />
</property>
</bean>
In viewing my webserver logs, this issue occurred when User A and B weren't even logged in at the same time. User A logged out and then User B logged in almost 20 minutes later.
I don't understand how the use of session scoped beans could possibly cross in other users data... is there something I don't understand about how these are scoped? I can attach some mocked up code if needed. Thanks in advance!
Are submit and review pages using same managed-bean? If not how you passed data to other page?