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
How can an exception be thrown manually by a programmer?
What is the effect of keeping a constructor private?
What is the use of singleton class?
What are the approaches that you will follow for making a program very efficient?
Are static members inherited to sub classes?
What is the purpose of garbage collection in java?
How does compareto method work?
Explain the transient field modifier?
Difference between arraylist and hashset in java?
What are the different types of inheritance in java?
Can you extend main method in java?
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
Are private methods final?
What is the use of volatile in java?
What is the difference between error and an exception?