0

在多线程环境中创建存根类的新实例时,我在存根和轴服务上创建 _serviceclient花费了太多时间(尝试一次大约创建大约 300 个相同的存根需要超过 5 分钟)。但相同的存根试图以不到一秒的顺序创建(相同的 300 个存根)。

附加在几秒钟内计算存根类的新实例和 _serviceclient 创建。

有人可以帮助我理解以及如何解决问题。

存根创建代码:

public SessionManagerStub(ConfigurationContext configurationContext,String targetEndpoint, boolean useSeparateListener){
    this.opNameArray = null;
    NaviStopWatch stopWatch = new NaviStopWatch("SessionManager");
    this.populateAxisService(stopWatch);
    stopWatch.reset();
    this._serviceClient = new ServiceClient(configurationContext, 
    this._service);
    stopWatch.stopAndlogTime("_serviceClient");
    stopWatch.reset();
    this._serviceClient.getOptions().setTo(new EndpointReference(targetEndpoint));
    this._serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
}

在此处输入图像描述

在此处输入图像描述

4

0 回答 0