How to perform Singleton of the java class object on multi
JVM?

Answer Posted / balu

Its possible to write a singleton class by
storing/serializing the singleton object into a flatfile
and use it across all the JVM's. By which it ensures that
only one instance is crested and used across multiple JVM's.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the size of int?

601


Give any two differences between C++ and java.

560


Which programming language is best in future?

527


What is == and === in javascript?

561


Does java linked list allow duplicates?

556






What is run time allocation?

579


What is the static import?

591


What is the maximum size of array in java?

518


What are different types of arrays?

535


Why 1 is not a prime number?

561


Explain about automatic type conversion in java?

573


Can we convert stringbuffer to string?

566


What are the fileinputstream and fileoutputstream?

571


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

562


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

640