>>> Vaijayanthi Kolli <[EMAIL PROTECTED]> 05-May-00 12:19:35
AM >>>

>  I want it to have multiuser access.

This has come up many times on this list... if you check back through
the archives you will see many discussions on this subject.


>I have tried implementing singlethread model.

Why? This will stop more than one person from being able to use the
servlet at any one time.

SingleThreadModel is mainly for debugging purposes.


>In this case,if 2 users try to enter info at the same
>time,only the info of the user who has entered
>later is inserted into the database, twice.

This doesn't sound right.

Firstly - you need to lock access to the database updates *only* if
the database cannot handle multiple connections *or* your application
requires those updates to be synced in some way.

(An example of an app that required synced updates is using a SELECT
to get a rowid before inserting a row with an incremented rowid).


>I am new to Java and would like your suggestion in
>this regard.

I suggest you go back to what you want to do, plan it out in pseudo
code and then convert that to a Java servlet.

The error you are reporting sounds like a fundamental problem of
logic.



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

Reply via email to