2

次の警告が表示された後、Jettyで実行されるCXF(2.5.2)で作成されたサービスを備えたNPEが表示されました。警告で提案されているように、誰かがエグゼキュータキューのサイズを増やす方法を知っていますか?

org.apache.cxf.interceptor.OneWayProcessorInterceptor handleMessage
WARNING: Executor queue is full, run the oneway invocation task in
caller thread. Users can specify a larger executor queue to avoid
this.

WARNING: Interceptor for
{http://docs.oasis-open.org/wsn/bw-2}MyPublishService#{http://docs.oasis-open.org/wsn/bw-2}Notify
has thrown exception, unwinding now
java.lang.NullPointerException
       at org.apache.cxf.jaxws.context.WrappedMessageContext.<init>(WrappedMessageContext.java:107)
       at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:53)
       at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
       at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
       at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
       at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
       at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:232)
       at org.apache.cxf.interceptor.OneWayProcessorInterceptor.handleMessage(OneWayProcessorInterceptor.java:143)
       ...

更新:受け入れられた回答のおかげで、次の春のBeanを含むxmlファイルを作成しました。

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="cxf.default.workqueue" class="org.apache.cxf.workqueue.AutomaticWorkQueueImpl">
        <property name="name" value="default" />
        <property name="queueSize" value="512" />
    </bean>
</beans>
4

1 に答える 1

2

簡単に構成することはできません(AutomaticWorkQueueアプリケーションのバスに独自のインスタンスを登録する必要があります)。呼び出しを処理するスレッドの最大数のデフォルト値は256です。これは、サーバーが呼び出し元のスレッドをブロックすることなく@OneWay、最大256の同時要求を処理できることを意味します。@OneWay

あなたの場合、仕様http://grepcode.com/file/repo1.maven.org/maven2org.apache.cxf.workqueue.AutomaticWorkQueueImplに従って、プロパティを持ち、name="default"キューサイズと初期スレッド数、高範囲と低範囲を設定したタイプのSpringBeanを作成できます。 /org.apache.cxf/cxf-rt-core/2.1.4/org/apache/cxf/workqueue/AutomaticWorkQueueImpl.java

于 2012-06-25T19:44:55.787 に答える