A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Threads and Synchronization
Joined: Mar 28, 2003
Mar 28, 2003 21:20:00
1 How control the concurent users?
Suppose I have 4 concurent users but I want for the pariculer time one request should be handled.
2How can i make the bean syncronization?
Joined: Oct 01, 2001
Mar 31, 2003 12:46:00
It sounds like you're asking how to create a critical section of code. In
, that's very easy. Just use the key word "synchronized". It's typically used to synchronize an entire method, by you can also synchronize a block of code if you want.
Joined: Apr 30, 2003
Apr 30, 2003 13:50:00
There can be 2 ways of doing this. Either make the method synchronized by using the keyword 'synchronized' or use the synchronized statement that allows u a finer granularity of locking.
I agree. Here's the link:
JDOM and Concurrency
control the concurent users
Getting org.jboss.util. NestedSQLException : No ManagedConnections available
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015