On 17/11/2009 15:43, David Balažic wrote:
Hi!
Does tomcat offer any mechanism for locking servlet executions?
So if one servlet does:
- get 10 EUR from account 1 (read account 1 balance; substract 10;
store new balance)
- add 10 EUR to account 2 (...)
How can I make sure no other servlet d
ne for the DB.
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, November 17, 2009 10:13 AM
To: Tomcat Users List
Subject: RE: synchronizing in tomcat
> From: Neil Aggarwal [mailto:n...@jammconsulting.com]
> Subject: RE: synchro
> From: Neil Aggarwal [mailto:n...@jammconsulting.com]
> Subject: RE: synchronizing in tomcat
>
> At first thought, I would create a class
> with synchronized static methods to do each of your
> processing tasks. That way, you are guaranteed
> only one method is executi
> Does tomcat offer any mechanism for locking servlet executions?
I think you are going to have to take care of this in your
application code.
At first thought, I would create a class
with synchronized static methods to do each of your
processing tasks. That way, you are guaranteed
only one met
How would you do it in a non-servlet environment?
Exactly the same works here too.
regards
Leon
On Tue, Nov 17, 2009 at 4:43 PM, David Balažic wrote:
> Hi!
>
> Does tomcat offer any mechanism for locking servlet executions?
>
> So if one servlet does:
> - get 10 EUR from account 1 (read accoun