JTA..JTS

Erwin D'Souza wrote:

>DGA,
>
>I'm afraid you might have misunderstood my question. The inconsistency of
>the data is not in the DB, but in the session bean (vanilla, web-tier)
>since that's where i'm storing the data. I will be using transactions with
>the DB, so that's not the problem.
>I guess one solution would be to start a client transaction the moment the
>request enters the web-tier....
>
>Any better ideas?
>thanks!
>
>-Erwin
>
>
>>It depends on the transaction semantics of your DB calls. i.e. If
>>all DB calls from each request were enclosed within a transaction
>>then they should be transparent to one another until they have
>>completed.
>>Each screen would show the correct info but the data from the second
>>request would overwrite the data from the first request (assuming
>>optimistic locking strategy).
>>
>>If your not using transactions then your data may become mixed up.
>>
>>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 13:45
>>>To: [EMAIL PROTECTED]
>>>Subject: Re: [EJB-INT] synchronize session beans?
>>>
>>>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
>>>
>
>===========================================================================
>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".

Reply via email to