【问题标题】:How to increase the adapter procedure timeout value in Worklight?如何在 Worklight 中增加适配器过程超时值?
【发布时间】:2013-04-04 09:47:24
【问题描述】:

如何增加 Worklight 适配器过程的超时值?我的应用程序崩溃,我在异常详细信息中看到以下内容:

“响应 [/apps/services/api/index/common/query] 成功:/-secure- {"responseID":"24","errors":["调用过程 'getFTTitle' 有 30 后超时 sec."],"isSuccessful":false,"warnings":[],"info":[]}/ "

【问题讨论】:

    标签: timeout adapter ibm-mobilefirst


    【解决方案1】:

    Worklight 中有几个地方可以指定超时值:

    CLIENT ----> WORKLIGHT SERVER --(适配器)--> BACKEND

    您可以increase the adapter procedure timeout(Worklight Server --> Backend)如下:

    <procedure name="nameHere" requestTimeoutInSeconds="valueHere"/>
    

    我不知道您的具体用例是什么,所以请务必也increase the client-side timeout。让它们相互匹配。

    WL.Client.invokeProcedure(invocationData,{
        onSuccess : getDataSuccess,
        onFailure : getDataFailure,
        timeout   : valueHere
    });
    

    另请注意,如果您需要将超时时间增加到一整分钟,请考虑此处可能不存在某些内容...

    【讨论】:

    【解决方案2】:
    var wlInitOptions = 
    {
        // # Worklight server connection timeout
        timeout: 60000,
        ...
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-31
      • 2023-03-02
      • 2015-10-25
      相关资源
      最近更新 更多