How to make servlet single threaded?
Hi All,
My application is for multiple users.
There are 5 different coppies of application with 5 different databases. I am trying to create one unique ID accross all application and databases.
I am reading the values from from all 5 databases and creating ID.
So its is working for single application.
But when 2 or more user try to add entry with unique ID at the same time,then prob occures.
So how to make servlet single threaded?
Actually my code is scattered among 2 servlet and 2 more java files.
So I can't even use lock and unlock tables. becoz getting and closing the connection is at one place and the need is at some other place.
Can somebody tell what to do?
Make Problem solving Fun
|