Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how to handle a singleton service locator. when multiple threads are trying to get the singleton ob..

Answer / 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

how to handle a singleton service locator. when multiple threads are trying to get the singleton ob..

Answer / krishnapal

Using synchronized method we can using put requesting
threads into waiting queue.

Is This Answer Correct ?    3 Yes 0 No

how to handle a singleton service locator. when multiple threads are trying to get the singleton ob..

Answer / wikipedia

Detailed answer here:
http://en.wikipedia.org/wiki/Singleton_pattern

Is This Answer Correct ?    0 Yes 1 No

how to handle a singleton service locator. when multiple threads are trying to get the singleton ob..

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

Post New Answer

More Core Java Interview Questions

how can you say that java is independ language

2 Answers   TCS, Wipro,


What is the exception hierarchy in java?

0 Answers  


What is the arguement of main method?

1 Answers  


What is gc()?

0 Answers  


How can you share data between two thread in Java?

0 Answers  


How can we pass argument to a function by reference instead of pass by value?

0 Answers  


What is an object?s lock? Give name of object?s that have locks?

2 Answers  


As a developer what steps do you take to improve the performance?

4 Answers  


How to perform merge sort in java?

0 Answers  


How do you write a good declaration?

0 Answers  


How do you compare two strings? any predefined method for this?

3 Answers  


What we have to do, when we don't want to implement all methods of an interface?

5 Answers  


Categories