How to perform Singleton of the java class object on multi
JVM?
Answers were Sorted based on User's Feedback
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 |
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 |
can we Connect Applet to Data Base ? with Discriptiom. and also What is Diff. from Applet & Servlet?
Why is stringbuffer called mutable?
Are there structures in java?
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }
How many types of java are there?
Can an interface implement another interface?
What are the types of arrays in java?
How do you use, call, and access a static method in Java?
What is the relationship between a method?s throws clause and the exceptions that can be thrown during the method?s execution?
What is the difference between inner class and nested class?
what is the difference between statis block and static variable
Can we declare a constructor as final?