First, the main feature of a Singleton is that it exists exactly once. So usually cloning does not make much sense. But as "once" is still relative, one can imagine scenarios where cloning of a Singleton is necessary.

But next: without the error message and the code for the Singleton class it is nearly impossible to determine the reason for the fail of clone().

It's not that simple! There's a lot of ins and a lot of outs that must be taken into account when cloning an object (for instance if the object contains fields that refer to mutable objects) [ May 07, 2008: Message edited by: Manuel Leiria ]

Syam Sathyan George
Ranch Hand

Joined: Apr 26, 2006
Posts: 64

posted May 07, 2008 05:17:00

0

I understand deep cloning is another topic by itself. Need to see the stack trace, to comment