cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Weinger <gwein...@itmedicine.net>
Subject Re: [SHOWSTOPPER?] cocoon sources no longer thread-safe
Date Wed, 04 Dec 2002 15:54:55 GMT
Good morning (from here in LA).

Sylvain Wallez wrote:

> Carsten Ziegeler wrote:
>
> >Hi,
> >
> >there were some problems with multi-threading and the environment
> >stack which should be fixed by last monday - at least that's
> >what I thought.
> >
> >However, there is one subtle thing to keep in mind:
> >ThreadLocal and InheritableThreadLocal variables!
> >The current environment stack uses a InheritableThreadLocal
> >variable - so you have to make sure that if you
> >create/use a different thread that this InheritableThreadLocal
> >variable is initialized correctly.
> >
> >Especially when you use thread-pools you have to
> >manually set this variable (contained in the
> >CocoonComponentManager) whenever you take a thread
> >out of the pool and use it.
> >
> >Is it possible, that your problems are related to this?
> >

Very possible.  We're using a home-grown Thread Pool (based on an Excalibur
pool), and not a ThreadLocal.


>
> If the problem is related to some (Interited)ThreadLocals which haven't
> the proper value, what about providing a ThreadPool component in Cocoon
> that cleanly manages these values, so that applications requiring thread
> do not have to wonder about it ?

That would be fantastic.

> I'm honored you ping me, but why me in particular (just curious) ?
>

Actually, I mean to write Carsten :-o because I knew he has been committing
those Environment stack changes, but my mind was in such a state last night
before I left . . .   I guess you two are interchangeable to me on some
subconscious level, as bedrock experts of Cocoon.  ;)

>
> >I know this is difficult to test without a sample.  My hope is that the
> >problem is significant enough to you committers to warrant fixing now.  I
> >would be happy to put together a test case and example for you to debug on
> >your own system.
> >
> >Also, I would love to donate the AsynchronousCIncludeTransformer.  It's
> >slightly over-componentized at the moment, but I'll send it to anyone
> >interested.
> >
>
> Ah, yes, please, please ! I'm very interested in this since I need
> parallel aggregation for a projet I'm currently working on.
>
> And since you kindly propose to donate it, I can also help the migration
> to Cocoon's CVS.
>
> Thanks,
> Sylvain

Great!  I will do it today, but because of the time difference . . . it could
be tomorrow for you.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message