• 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: 42972
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!