db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: cvs commit: db-torque/src/java/org/apache/torque Torque.java
Date Mon, 30 Jun 2003 22:51:57 GMT
"Henning P. Schmiedehausen" <hps@intermeta.de> writes:

> Daniel Rall <dlr@finemaltcoding.com> writes:
> 
> >The addition of TorqueSingleton doesn't get us out of this situation
> >by any chance, does it?
> 
> That was the whole idea. The Singleton helped me to get rid of all the
> static references in Torque itself. For me (and at least for Martin,
> too) it works fine now as standalone Torque and as an Avalon
> component.

A huge +1 from me on the reasoning behind that change.  Velocity takes
a very similar approach.

One tweak to this which I would like to propose (and thus volunteer to
carry out) is changing the name of the class from "TorqueSingleton" to
"TorqueInstance" (or something similar).  To me, "singleton" implies
that there is only a single instance allowed per class loader.  If
TorqueSingleton doesn't already allow multiple instances of itself per
class loader, this seems like a natural goal, and changing the name is
a solid step in the right direction.

- Dan

Mime
View raw message