Originally posted by Greg Harris:
The GoF book can be pretty intimidating
true... it helped to have an instructor that was willing to give good examples in several different languages (java, c++ and ada95).
Originally posted by John Hembree:
And if it is? Does it hand back a reference to the previously initialized servlet? Is that how it ensures that there's only one instance?
Yes, that's correct, but after reading Michael's comments, I'd have to agree. I passed it with the Singleton as well, but the solution does appear to be along a different strain of singleton's possibly. Not sure if that still qualifies as a singleton, maybe it's a completely different pattern.
Originally posted by Marilyn de Queiroz:
There is more than one way to create a Singleton.
Originally posted by Pauline McNamara:
And on a related note, I've recently considered buying "Design Patterns Explained". Opinions?