I have a question in my mind that there is an issue with Singleton Pattern. Suppose i make an object of Singleton class and serialize it.
Now I restart the server.
Suppose I have again created the instance of Singleton class and then de-serialize it. It creates two objects.
This breaks the Singleton pattern. How do you solve it so that 2nd object is not created.