Jon Stevens wrote:
> 
> on 5/31/01 10:57 AM, "Jon Stevens" <[EMAIL PROTECTED]> wrote:
> 
> > on 5/31/01 10:23 AM, "[EMAIL PROTECTED]"
> > <[EMAIL PROTECTED]> wrote:
> >
> >>
> jakarta-turbine/src/java/org/apache/turbine/services/resources/TurbineResour
> c>> e
> >> Service.java
> >> lines 480-493:
> >>   public ResourceService getResources(String prefix)
> >>   {
> >>       Configuration config = getConfiguration().subset(prefix);
> >>
> >>       if (config == null)
> >>       {
> >>           return null;
> >>       }
> >>
> >>       TurbineResourceService res = new TurbineResourceService();
> >>       res.init(config);
> >>       return (ResourceService)res;
> >>   }
> >>
> >> This doesn't look like a singleton to me... :)
> >
> > No, it looks like a bug, why don't you submit a patch?
> >
> > Geez.
> >
> > -jon
> 
> Actually, looking at this further (and discussing with jvz), this isn't a
> bug, it is the way that that method need to be implemented because of what
> it does. This is a very isolated case and is not a reflection of the overall
> Services architecture. My statement about services inherently being
> singletons still stands.
> 

Agreed, I don't see how you can implement this ResourceService method using
only a singleton, I had to do the same thing for the Jetspeed resource
implementation.

My comment was just to show that some services are not *real* singletons; on the
other end of this issue, you have TemplateEngineService which doesn't even extend
the Service interface but is inherited by several other service interfaces...
(just a confusing naming convention, IMO)

--
Rapha�l Luta - [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to