Hi!
I have a web application and will have users connected to it simmultaneous.
The problem is the next:
With Accept button go to Configuration Action class, and it makes a session.setattribute("configuration", config_object) for save some object into session, after it redirect to Generation Action class.
Generation Action class make a session.getattribute("configuration") for get the object saved in Configuration Action class, after it
Generation Action class make a session.setattribute("generation", generation_object), and session.setattribute("configuration", config_object_modified) after it redirect to the
jsp.
In the jsp obtain the attributes with:
<jsp:useBean id="generation" scope="session" class="package.generationActionForm"></jsp:useBean>
<jsp:useBean id="configuration" scope="session" class="package.configurationActionForm"></jsp:useBean>
The problem is when two user acceded to click button I guess that the setattribute are saving like to application scope (getServlet().setattribute..) because both users the application display the same information and at the began the configuration was different. If the users acceded in different second the application run correctly.
If I synchronize the execute methods of Generation Action class and Configuration Action class the application runs correctly; but I dont want it, because if the user1 acceded to the database and his/her SQL Query runs slowly, the second user will be waiting until user1 finish.
Thanks! I hope I can help