Hi Stephan, >>>But is OfficeResourceLoader a service or a singleton? >> >>It needs to be, since it cashes the obtained resource bundles. > > I have state, therefore I am! :) > > Honestly: needs to be what?
Ooops, I read only half of your sentence, it seems :) should be "... to be a singleton." > (Caching might for example be done across > multiple service instances, or a service implementation might behave as > a singleton, by always returning the same instance for createInstance. > "What do we need singletons for in UNO, then?" you might ask. "Well, I > have no idea" I would confess.) Hmm, if we see it this way .... As far as I understood, the latter way (behave as singleton, return the same instance in every createInstance call) was considered Bad (TM) since the singleton-nature then is non-obvious. Caching across multiple instances sounds confusing, too. This is a pretty fuzzy, hmm, gut feeling only, but I wouldn't want to get the same resource bundle instance from different loader instance. Finnaly, for me it boils down to: Declaring a service as singleton is just some conceptual flavor for documentation purpose. You only need one process-wide resource loader, that's what is stated with the "singleton" attribute. > Thinking about it: it used to be common practice (at least that is my > impression) to name (old style) singletons with "the." However, it was > also the case that there always was an old style service Foo together > with an old style singleton theFoo of type Foo. With a new style > singleton of type XFoo, there no longer is a need for any service Foo, > so, yes, why not go forward and no longer prefix new style singletons > with "the"---what do others think? Sounds good to me ... Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
