hay7777
Sep 7th, 2004, 02:37 PM
Hi,
I have a DAO which I proxy and set up with an Interceptor using Spring.
However, there are no guarantees that Spring will be used everywhere the class is used.
I would normally force the DAO to be a singleton by using a private constructor with a getInstance(). How can I set this up so that Spring can create it as a Singleton, and everyone else have to use the getInstance()?
Cheers,
David
I have a DAO which I proxy and set up with an Interceptor using Spring.
However, there are no guarantees that Spring will be used everywhere the class is used.
I would normally force the DAO to be a singleton by using a private constructor with a getInstance(). How can I set this up so that Spring can create it as a Singleton, and everyone else have to use the getInstance()?
Cheers,
David