簡體   English   中英

Jetty 線程池嵌入 Apache CXF

[英]Jetty thread pool embeddend in Apache CXF

我正在處理由第三方編寫的代碼(它是一個獨立的軟件),我發現了一個我不清楚的代碼部分:

JAXRSServerFactoryBean restFactory = new JAXRSServerFactoryBean();
for (int index=0; index<resourceClasses.size(); index++) {
    restFactory.setResourceClasses(resourceClasses.get(index));
}
restFactory.setAddress(restServerUrl + restBasePath);
server = restFactory.create();

順便說一下,實例化了一個基於 Jetty 的 Apache CXF 3.1.2 服務器,但我在文檔中找不到關於 Jetty 使用哪個“默認”配置的信息。

另一個需要是更改Jetty的配置(設置線程池的參數),但我又不知道如何干預(我試圖定義一個beans.xml但顯然它沒有被讀取)。

如果您按照討論鏈接中的說明使用 Karaf 容器,則只需添加 *.cfg 文件即可配置池。

前任:

要添加的文件: $KARAF_HOME/etc/org.apache.cxf.http.jetty-8017.cfg

文件內容:

port=8017

threadingParameters.minThreads=10

threadingParameters.maxThreads=50

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM