You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/06/01 00:59:39 UTC
Re: service and MT safe
on 5/31/01 10:57 AM, "Jon Stevens" <jo...@latchkey.com> wrote:
> on 5/31/01 10:23 AM, "raphael.luta@networks.groupvu.com"
> <ra...@networks.groupvu.com> 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.
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: service and MT safe
Posted by ra...@networks.groupvu.com.
Jon Stevens wrote:
>
> on 5/31/01 10:57 AM, "Jon Stevens" <jo...@latchkey.com> wrote:
>
> > on 5/31/01 10:23 AM, "raphael.luta@networks.groupvu.com"
> > <ra...@networks.groupvu.com> 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 - luta.raphael@networks.vivendi.net
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: service and MT safe
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jon Stevens <jo...@latchkey.com> writes:
> on 5/31/01 4:46 PM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:
>
> >> 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.
> >
> > It needs a fat comment, then.
>
> No. It needs to be removed eventually.
Yes, definitely. But until then...
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: service and MT safe
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/31/01 4:46 PM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:
>> 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.
>
> It needs a fat comment, then.
No. It needs to be removed eventually.
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: service and MT safe
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jon Stevens <jo...@latchkey.com> writes:
> on 5/31/01 10:57 AM, "Jon Stevens" <jo...@latchkey.com> wrote:
>
> > on 5/31/01 10:23 AM, "raphael.luta@networks.groupvu.com"
> > <ra...@networks.groupvu.com> 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.
It needs a fat comment, then.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org