avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Ivanov" <my...@surfeu.fi>
Subject Re: Re: ResourceLimitingThreadPool support in cornerstone?
Date Tue, 09 Jul 2002 12:06:15 GMT
This is what I am working on now. So far I came across with simple problem.
I have phoenix based server application: usual connection handler etc. When
I was using DefaultThreadManager (DefaultThreadPool) I had sometime
situations when server was just creating new threads (hundreds of them).
After looking deeply into this problem I found mentioned lack of support of
ResourceLimitingThreadPool in cornerstone. So I implemented new
ResourceLimitingThreadManager and now testing it. The problem is that when
number of threads reached its maximum (so that no new connection handlers
are created) I can not stop Phoenix without following exception (see PS).
Also, I think org.apache.avalon.cornerstone.blocks.connection.Connection
class has to be modified in case of ResourceLimitingThreadManager...

Andrei
PS
JVM exiting abnormally. Shutting down Phoenix.
java.lang.IllegalArgumentException: Specified ThreadContext is already bound
to a thread
        at
org.apache.excalibur.threadcontext.ThreadContext.setThreadContext(ThreadCont
ext.java:104)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase
(DefaultApplication.java:350)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.stop(Def
aultApplication.java:181)
        at
org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:
267)
        at
org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.j
ava:57)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.shutdown(DefaultKe
rnel.java:177)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.removeApplication(
DefaultKernel.java:273)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(Defau
ltDeployer.java:202)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(Defaul
tDeployer.java:167)
        at
org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.ja
va:281)
        at
org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.j
ava:58)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.shutdownCompon
ents(DefaultEmbeddor.java:547)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dispose(Defaul
tEmbeddor.java:293)
        at
org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.ja
va:281)
        at
org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.j
ava:58)
        at
org.apache.avalon.phoenix.frontends.CLIMain.shutdown(CLIMain.java:285)
        at
org.apache.avalon.phoenix.frontends.CLIMain.forceShutdown(CLIMain.java:254)
        at
org.apache.avalon.phoenix.frontends.ShutdownHook.run(CLIMain.java:345)



----- Original Message -----
From: "Peter Donald" <peter@apache.org>
To: "Avalon-Phoenix Developers List" <avalon-phoenix-dev@jakarta.apache.org>
Sent: Tuesday, July 09, 2002 2:51 PM
Subject: Re: ResourceLimitingThreadPool support in cornerstone?


On Tue, 9 Jul 2002 19:37, Andrei Ivanov wrote:
> there is the org.apache.avalon.cornerstone.blocks.threads.ThreadManager
> which is used for configuration of
> org.apache.avalon.excalibur.thread.impl.DefaultThreadPool in Phoenix. But
> there is no "ResourceLimitingThreadManager" implemented for cornetstone.
Is
> it dropped for a reason? From my point of view Phoenix (plus cornerstone)
> is first of all server application oriented container so that
ThreadManager
> which uses
> org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool must be
> there.

You are right. It is something that is missing. It would be nice to extend
DefaultThreadManager so that it could define "thread groups" (aka pools) as
resource limiting. Wanna send a patch ? ;)


--
Cheers,

Peter Donald
----------------------------------------
"Liberty means responsibility. That is
      why most men dread it." - Locke
----------------------------------------


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



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


Mime
View raw message