how to handle a singleton service locator. when multiple threads
are trying to get the singleton object in same time
Answers were Sorted based on User's Feedback
Answer / krishnapal
Using synchronized method we can using put requesting
threads into waiting queue.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / wikipedia
Detailed answer here:
http://en.wikipedia.org/wiki/Singleton_pattern
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / gowramma m
Two ways to create threads
1)by creating thread class
class classname extends Thread
{
}
2)By converting class to thread ie using Runnable interface
| Is This Answer Correct ? | 1 Yes | 7 No |
What is difference between array and vector?
What is ascii format?
difference between jsp and java script?
What is the final keyword denotes?
Write a program to reverse array in place?
steps to connect with Oracle Databse using TYPE-2 Jdbc driver.
How do u pass data from one jsp to another jsp?
Is null or empty java?
How do you start a thread?
How listener identify that the event came from a particular object?
What is the size of string?
Explain about object oriented programming and its features?