DGA, yep, that's what i mean. I'm not talking about ejbs, i'm talking about normal javabeans. What if multiple requests from the same user (the same session) come at the same time? (for example, while using frames, or upon double-clicking form buttons, or even multiple windows with the same session....) So, what should I do? How is this normally handled?
I'll give an example. Suppose the user fills a form, the same form, in two browser windows (with the same session), with different data in each form. He submits both at approx the same time. The next screen to be displayed would be a confirmation page, displaying all the entered info. The first request would update the database, ask the session bean (S) to update itself from the database, and start displaying the confirmation page using information from session bean S. Suppose that, by now, the second request has updated the database and asked session bean S to update itself from the database. So, the response (confirmation page) from the first request would contain half the data from the first request, and the remaining from the second.... in other words, inconsistent data. The second request would, I suppose, display the correct information in its window. But the first request is what gets messed up. Any thoughts? Thanks! -Erwin > Erwin, > Wht exactly do you mean by "no EJB, vanilla bean..." am I right > in > thinking you are using a standard Java Bean within the session of a JSP? > > regards > > DGA > > > -----Original Message----- > > From: A mailing list for Enterprise JavaBeans development [mailto:EJB- > > [EMAIL PROTECTED]] On Behalf Of Erwin D'Souza > > Sent: 19 March 2002 12:54 > > To: [EMAIL PROTECTED] > > Subject: [EJB-INT] synchronize session beans? > > > > Hi list, > > > > I have a session bean (not EJB, vanilla bean)... now, suppose two > requests > > come from the same user at the same time. The first request gets ahead > and > > is currently displaying the jsp, accessing info from the session bean. > The > > second request meanwhile is asking the bean to update its data (read > from > > the database). > > So there's the possibility of inconsistent data being displayed by the > > first request. > > So, what do you guys do about this? what should I synchronize? Or are > my > > fears baseless? > > > > TIA! > > > > -Erwin > > > > > ======================================================================== > == > > = > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > > body > > of the message "signoff EJB-INTEREST". For general help, send email > to > > [EMAIL PROTECTED] and include in the body of the message "help". > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff EJB-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
