message number

guest (servlet)
usually message number is stored in a file
suppose it is 1000
servlet A read num=1000
servlet B read num=1000
servlet A increase num=1001
servlet B increase num=1001
servelt A write 1001
servelt B write 1001 !

the num should be 1002!

2000-11-28 -04:00

回到话题: Re #15734: how to lock a file in Java? I mean how java provide flock()?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论