Hi Berin,
> -----Original Message-----
> From: Berin Loritsch [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 07, 2003 7:17 PM
>
> > currently I am running in major concurrency problems, since a second
> > thread is configuring my components while the thread with the
> > initialization of the Fortress root container (in a webapp). Where
> > does this get started and how can I avoid this second thread
> > completely?
>
> The thread is created in the Event package. I am curious as to
> what kind of concurrency problems you are running into--if it is
> Fortress related or not. Could you provide a little more detail
> on that?
<blush>typo in config</blush>
> You can set the setThreadsPerProcessor() on FortressConfig to 1,
> but that limits you to one background thread.
Ahhh. I was not aware of that Fortress will start several threads for
its initialization. Cool. I always suspects Instrument starting this
threads :)
> Another alternative is to declare your components as activated
> on request:
>
> <mycomponent id="foo" activation="request"/>
>
> The activation attribute defaults to "startup".
>
> That puts Fortress back in line with the ECM startup approach.
ECM? What's that? <ggg>
Yes, I saw this attribute debugging the code. Meanwhile I have for a
very special purpose an own "LazyContainer", that will initialize
multiple instances of a component using a extended "hint" syntax:
"role/id�number".
Even more these components are disposed if they were released to
the service manager after some time without beeing lokkuped
again ... :)
> More often than not, what might happen is if you have a
> circular dependency then one component won't be able to get
> another component because it is trying to get the first one.
No circulars ... yet <g>
> > BTW: I dont have any configuration settings for instrument. But I
> > assume that is has something to do with my prblems.
>
> Check your log, and make sure the debug is on. I doubt it is
> the source of your problems.
Guessed right. Anyway I found a way to get rid of the Instrument:
====== snip ======
lFortressConfig.setInstrumentManager(new InstrumentManager(){
public void registerInstrumentable(Instrumentable i, String name)
throws Exception {
}
});
====== snap ======
KISS :)
With an init-param in the web.xml I could eneble it easily again.
Regards,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]