how to handle a singleton service locator. when multiple threads
are trying to get the singleton object in same time

Answer Posted / sitaram

Singleton service means only one service provide at a
time.When multiple threads are trying to get the singleton
object in the same time.we can get an error. because only
one object provide in complete application.

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between integer parseint and integer valueof?

556


Why constructor has no return type?

640


What is role of void keyword in declaring functions?

580


What is empty list in java?

629


How to make a read-only class in java?

595






Can static methods be inherited?

537


What are local variables?

599


What is the difference between procedural and object-oriented programs?

528


what is the difference between the methods sleep() and wait()? : Java thread

517


Why pass by reference is not possible in java?

502


Why packages are used?

548


Is it possible for a yielded thread to get chance for its execution again?

516


What is the use of :: in java?

572


What do you mean by inner class in java?

568


what is the purpose of the runtime class?

555