This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

basic static method question  RSS feed

 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are working with a customer who has a legacy framework that uses static methods on the service class. The client code simply calls on this method to perform the service.

When there is heavy concurrency in the system, and multiple users are trying to access the same method of a service, would this become a bottle-neck w.r.t performance, or Java would simply allow all the threads to come in simultaneously. Would java do any synchronization internally to control the traffic?

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM would not internally synchronize access, or throttle it to facilitate single-threaded access - the application code will have to do this.

Let's move this to the Threads & Synchronization forum, as it has nothing to do with the SCJP.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!