cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: C2 thread savety
Date Mon, 24 Jul 2000 06:35:35 GMT
Stefano Mazzocchi wrote:
> 
> Giacomo Pati wrote:
> >
> > I've encountered a problem concerning thread savetyness. The old C2
> > sitemap engine instantiated a component object (generator, serializer,
> > etc.) for every request. The new sitemap engine does not.
> 
> I recall a discussion with Pier about this.
> 
> > Now we should
> > decide if a sitemap component should be thread save, or not or if we
> > could have a mixture of both (indicated in the sitemap as an attribute
> > like thread-save="yes").
> 
> I would say that sitemap components "must" be thread safe.

So the sitemap components itself should take care of it and the sitemap
engine does not have to check for a Interface which states if it is
thread save or not. This would reduce complexity in the sitemap code
generating stylesheet because it will have to check implemented
Interfaces with XSLT extension functions to generate the right code to
access the component by means of instantiating those components to check
implementation of an Interface and throw it away afterwards.

> Let not make the same mistake Servlets did: either you learn how to
> program something for thread safety or you don't program something on a
> highly concurrent enviornment. Period.

I agree, totally.

> Having something like thread-safe="yes" breaks separation of concern
> between administration and logic.

Yes.

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

Mime
View raw message