You may use Java 'synchronized' methods.
swamy
-----Original Message-----
From: Nanduri Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 28, 1999 11:26 AM
To: [EMAIL PROTECTED]
Subject: Question that is puzzling me
Guys/Girls ,
I am calling a servlet from a jsp. The servlet implements the
SingleThreadModel.
The servlet has a doPost() method that writes data to a table in the
database.
The primary key
for each row of this Table is got by counting the ( number of rows in the
Table
+ 1 ). This is done in the
doPost() method. Also i am setting autoCommit() to false ( in the Connection
Object ) and doing either a
complete commit() or a complete rollback().
My question is... if different people hit this page simultaneously, will i
still
be getting unique primary keys for every person
(or) if not is there a better way to do it......... Thanks in advance.
Cheers,
Amar..
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html