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

Answers were Sorted based on User's Feedback



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

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

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

Answer / boka

How would you maintain the state of the object across the
JVM... if a singleton is being worked upon on multiple JVMs
and each one changes the state of Singleton how would this
be maintained. I dont think that Singleton across JVMs
makes any sense...

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Core Java Interview Questions

What is a java applet? What is an interface?

0 Answers  


What is CardLayout?

1 Answers   Infosys,


Which is better stringbuffer or stringbuilder?

0 Answers  


Can memory leak in java?

0 Answers  


What type of variable is gender?

0 Answers  






How can two threads be made to communicate with each other?

3 Answers   HCL,


What is empty string literal in java?

0 Answers  


how to run servlet program between two computer through the internet ?

2 Answers   Kiran Prakashan, TCS,


Difference between process and thread?

0 Answers   HP,


How do you replace a string in java?

0 Answers  


Difference between a process and a program?

0 Answers   Infosys,


Can we pass null as argument in java?

0 Answers  


Categories