mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
thread pooling in xml rpc handler implementation
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -5,10 +5,7 @@ package com.intellij.ide;
|
||||
|
||||
import com.intellij.openapi.components.ApplicationComponent;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import org.apache.xmlrpc.WebServer;
|
||||
import org.apache.xmlrpc.XmlRpcContext;
|
||||
import org.apache.xmlrpc.XmlRpcRequestProcessor;
|
||||
import org.apache.xmlrpc.XmlRpcWorker;
|
||||
import org.apache.xmlrpc.*;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -36,37 +33,7 @@ public class XmlRpcServerImpl implements XmlRpcServer, ApplicationComponent {
|
||||
if (!checkPort()) return;
|
||||
|
||||
try {
|
||||
myWebServer = new WebServer(getPortNumber(), null, new org.apache.xmlrpc.XmlRpcServer(){
|
||||
protected XmlRpcWorker createWorker() {
|
||||
return new XmlRpcWorker(getHandlerMapping()){
|
||||
|
||||
public byte[] execute(InputStream inputStream, String string, String string1) {
|
||||
try {
|
||||
return super
|
||||
.execute(inputStream, string, string1);
|
||||
}
|
||||
finally {
|
||||
resetRequestProcessor();
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] execute(InputStream inputStream, XmlRpcContext xmlRpcContext) {
|
||||
try {
|
||||
return super
|
||||
.execute(inputStream, xmlRpcContext);
|
||||
}
|
||||
finally {
|
||||
resetRequestProcessor();
|
||||
}
|
||||
}
|
||||
|
||||
private void resetRequestProcessor() {
|
||||
requestProcessor = new XmlRpcRequestProcessor();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
myWebServer = new IdeaAwareWebServer(getPortNumber(), null, new IdeaAwareXmlRpcServer());
|
||||
myWebServer.start();
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user