how to handle a singleton service locator. when multiple threads
are trying to get the singleton object in same time
Answer Posted / krishnapal
Using synchronized method we can using put requesting
threads into waiting queue.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Should you use singleton pattern?
When is the finalize() called?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
What is a treeset class?
What about interrupt() method of thread class ?
How can we make a class singleton?
What are the five major types of reference sources?
Write a program in java to find the maximum and minimum value node from a circular linked list.
Which language is java?
Distinguish between a predicate and a function?
Can you write a java class that could be used both as an applet as well as an application?
Why is it called a string?
Can we create an object of private class?
What is vector capacity in java?
What are the advantages of user defined functions?