質問

It seems to me the thread-max is always 128 no matter what I set:

Below is my config.

<server-default>
    <jvm-arg-line>-Xmx2048m</jvm-arg-line>
    <thread-max>64</thread-max>
</server-default>

<server id="" address="127.0.0.1" port="6800">

    <-- More settings -->

    <!-- Maximum number of threads. -->
    <thread-max>20</thread-max>

</server>

Am I missing something about this? How do I get the config work?

I can set the value in by code:

com.caucho.util.ThreadPool.setThreadMax(6);

Had another problem with the com.caucho.util.ThreadPool.setThreadMax(6). If I debug or run through Eclipse, it is OK. However, when I run in the Cmd with ant, it reports: [java] java.lang.NoClassDefFoundError: com/caucho/util/ThreadPool exception.

I am using Resin 4.0.32 with Java 1.6_16. Eclipse version is 4.2 if this matters.

Any suggestion or comments are appreciated.

役に立ちましたか?

解決

I found the problem,

The reason I get the exception when run with ant but didn't get it while in Eclipse IDE is because in the project, I am referring the resin.jar of version 3.0.21 and the API has been changed in resin 4.0.32 for ThreadPool related functions. It is no longer in com.caucho.util. When I debug using Eclipse, resin 3.0.21 is in the class path. But when I ran with ant, we are using resin 4.0.32.

I guess it is the same reason for the first question. I am not using the right function to read the stats.

Hope this helps.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top