On Jan 4, 2006, at 6:31 PM, Allen Gilliland wrote:
On Wed, 2006-01-04 at 15:22, David M Johnson wrote:
There's no requirement that they be singletons, but there is some
cost to instantiating a RollerImpl in terms of object creation and
reading the Hibernate mapping files is costly, so we don't want to do
that more than once if we can help it.
right. the Roller object should probably be a singleton, but I was
talking more about calls to roller.getXXXManager(). I think those
methods could actually construct a new XXXManagerImpl instance to
return, rather than maintaining a reference to a single instance.
They could, but why create objects when you don't have to?
- Dave