[Yanel-dev] Problems with singleton

Michael Wechner michael.wechner at wyona.com
Fri Apr 9 16:24:26 CEST 2010


Hi

I recently had another experience re a singleton which was intended to 
be a good idea re avoiding
concurrent access, but caused problems within a multi-realm environment.

For example if you implement the sitetree as a singleton and two realms 
are using the same implementation,
then the first sitetree which will be loaded will rule and hence you 
will have strange behaviour within the second realm
or rather you will access the sitetree of the first realm also within 
the second realm.

It seems to me that many of us developers forget that people might want 
to setup the same realm multiple times,  hence
I wanted to make you aware of this.

Thanks

Michi




More information about the Yanel-development mailing list