0

環境:
1. Windows 7 および
2. IBM MobileFirst Platform Studio 7.0

Getting Started モジュールからの IBM MobileFirst Platform 7.0 のサンプルWorking offlineアプリケーションは、以下の手順でインポートおよびテストされます。

1. Set heartbeat to 5 seconds
2. Background application behavior can be seen using web debuggers
3. Shut down MobileFirst Server
4. In a few seconds heartbeat should fail, and disconnectDetected function should be invoked
5. Start up MobileFirst Server
6. In a few seconds heartbeat should succeed, and connectDetected function should be invoked

ただし、 サーバーが停止したときと起動したときに、それぞれdisconnectDetectedおよびconnectDetected関数はトリガーされませんでした。

function disconnectDetected(){
    var output = new Date() + "<hr />disconnectDetected";
    $('#info').html(output);
}

function connectDetected(){
    var output = new Date() + "<hr />connectDetected";
    $('#info').html(output);
}

ログを以下に示します。

http://localhost:10080/WorkingOffline/apps/services/preview/WorkingOffline/common/0/default/js/test.js Failed to load resource: the server responded with a status of 404 (Not Found)
wljq.js:8654 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
worklight.js:5127 wlclient init started
worklight.js:5127 before: initOptions.onSuccess
worklight.js:5127 after: initOptions.onSuccess
worklight.js:5127 wlclient init success
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 401 (Unauthorized)
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3794 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.handleResendOrSendPostAnswersworklight.js:3783 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.removeExpectedAnswerworklight.js:9432 challengeHandler.submitChallengeAnswerworklight.js:10193 wl_antiXSRFChallengeHandler.handleChallengeworklight.js:9328 AbstractChallengeHandler.startChallengeHandlingworklight.js:9251 executeChallengeworklight.js:9153 checkResponseForChallengesworklight.js:3598 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailureworklight.js:956 (anonymous function)worklight.js:1178 window.WLJSX.Ajax.Request.WLJSX.Class.create.respondToReadyStateworklight.js:1111 window.WLJSX.Ajax.Request.WLJSX.Class.create.onStateChangeworklight.js:956 (anonymous function)
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 404 (Not Found)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 404, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 401 (Unauthorized)
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3794 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.handleResendOrSendPostAnswersworklight.js:3783 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.removeExpectedAnswerworklight.js:9432 challengeHandler.submitChallengeAnswerworklight.js:10193 wl_antiXSRFChallengeHandler.handleChallengeworklight.js:9328 AbstractChallengeHandler.startChallengeHandlingworklight.js:9251 executeChallengeworklight.js:9153 checkResponseForChallengesworklight.js:3598 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailureworklight.js:956 (anonymous function)worklight.js:1178 window.WLJSX.Ajax.Request.WLJSX.Class.create.respondToReadyStateworklight.js:1111 window.WLJSX.Ajax.Request.WLJSX.Class.create.onStateChangeworklight.js:956 (anonymous function)
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully

ただし、IBM MobileFirst Platform 6.3 Sample Working Offline アプリケーションから始めると、IBM MobileFirst Studio 6.3 で完全に機能します。

4

1 に答える 1

0

現状では、これは欠陥のようです - 現在デバッグ中です。
回避策はないようです。

修正が必要な場合は、PMR (IBM サポート チケット) を開く必要があります。

于 2015-03-26T13:06:22.513 に答える