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


Please Help Members By Posting Answers For Below Questions

Are arrays static in java?

775


How does thread synchronization occurs inside a monitor?

752


What is time complexity algorithm?

777


Is null a string in java?

752


What is singleton math?

784


What are the two types of exceptions in java? Which are the differences between them?

757


how to handle exceptions in ejb?

2085


What are the pillars of java?

661


Write a program to print all permutations of string?

894


Is 0 an even number?

744


What is array class in java?

773


Explain different types of wrapper classes in java?

786


What is the current version of java?

750


Why string is immutable with example?

719


what is abstract class in Java?

875