This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes syncronization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "syncronization" Watch "syncronization" New topic
Author

syncronization

thinakaran thinakaran
Greenhorn

Joined: Mar 28, 2003
Posts: 8
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?
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2931
    
  12

It sounds like you're asking how to create a critical section of code. In Java, 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.
Madhav Bhargava
Greenhorn

Joined: Apr 30, 2003
Posts: 6
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: http://aspose.com/file-tools
 
subject: syncronization
 
It's not a secret anymore!