sandra ruiz wrote:
> this happens with any servlet...
> 
> I tried this on my machine and it doesn't really happen. I think this
> is because my connection to
> the server is so fast that I dont have enough time to make a double
> click. But I've got a  coworker that is doing the tests. He has a
> slower connection and if he just make more than one click on any
> button on a form..the server crash down.

What about forms that don't use a database at all?

I am guessing that you are having thread safety problems with your database.
Which database are you using?  Are you using a database connection pool?

> 
> For example: I have a servlet that calls a function that
> inserts(create) something in a database.
> When the user makes double click on "Create" instead of just one
> click..the server try and try to
> make the insert..and at the end..just gets blank.
> 
> other times it shows a database error of "duplicated key". I
> understand this is because the server
> try to process the two request..but I need to control this..and only
> permit one process.
> 
> likewise..we also have a little similar problem with frames..because
> the frame called two servlets
> at the same time..and we had to make a delay in one of them with
> javascript 
> 
> 
> Most of my code is just operations to a database..It doesn't do
> anything weird..I dont handle
> threads or anything like that.

You do need to be aware of thread safety when using databases though.

- Geoff


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to