avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mati" <m...@ncdc.pl>
Subject ThreadPool + excalibur event + Cornerstone ThreadManager
Date Wed, 08 Jan 2003 14:32:23 GMT


I have been trying to use DefaultThreadManager from excalibur event package.

I just do not want to have an additional ThreadPool managed by
TPCThreadManager so I thought I would use the cornerstone one

The problem is that CornerStone uses old ThreadPool
import org.apache.avalon.excalibur.thread.ThreadPool;

which is depracated by now

On the other hand AbstractThreadManager expects to get the new one, and here
we have a problem
import org.apache.excalibur.thread.ThreadPool;

because I get exception:

org.apache.excalibur.containerkit.lifecycle.LifecycleException: Component
named "my-thread-manager" failed to pass through the Initialization stage.
(Reason: java.lang.IncompatibleClassChangeError).

I do not know what is the proper way of solving this problem. I've spotted
that Peter Donald created DefaultThreadManager (excalibur-event) so I am
wondering how did he manage to force these to work with Cornerstone
ThreadManager and it's ThreadPool.


Here is the code snippet:

public void initialize() throws Exception {
    //this.threadManager = new TPCThreadManager();
    ThreadPool pool = this.cornerStoneThreadManager.getDefaultThreadPool();
    this.newThreadManager = new DefaultThreadManager(pool);

this.newThreadManager.enableLogging(getLogger().getChildLogger("excalibur-th
read-manager"));
    newThreadManager.initialize();
}

I would appreciate any feedback.

TIA

Mateusz Szczap
mati@no.spam.ncdc.pl


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message