I can solve this problem using singleton pattern. But problem is I don't have control on other application which is going to call new MyClass().
Is there any way I can do in implicit constructor of MyClass?.
Something like this.
class ClassName {
public ClassName() {
if( object exist for ClassName)
return that
else
create New ClassName object
}
}
Thanks in advance.