locked
How to make Singleton class secure? RRS feed

  • Question

  • hi buddies,
                    I have a Singleton class which I instantiate using reflection by a call to a public getInstance method that return the object from a private constructor. I have to use reflection as I dont have any other options since my class instantiation is decided on runtime. How will I secure other form instantiating the same class again by using reflection on my private constructor?

    Thanks in advance

    Himanshu
    Thursday, June 7, 2007 6:02 AM

All replies