>>> "Chauhan, Vivek" <[EMAIL PROTECTED]> 26-May-00 3:46:23 PM >>>
>It's not necessary to synchronize the calls to database if
>you take care in writing the SQL code. For example if you
>use a SEQUENCE in ORACLE to get next available ID,
>there is no possibility of a conflict. Also rather than
>synchronizing, you can always get a lock(implicitly most of
> the time) explicitly if there is a need. Almost all relational
>databases take care of concurrency issues.
Just so...
but such syntax is not always available. SQL92 doesn't standardise
sequences or anything like them (AFAIK).
All I'm saying is that it is necessary sometimes.
In reply to Kevin's point about not having exclusive access to the
database that is not always true either. I've written servlets where
there is a MySql backend exclusive to the servlet engine, no other
process involved.
Though of course he's right that in a distributed environment Java
synchronization does nothing.
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html