Search code examples
ibm-mobilefirstworklight-adapters

MobileFirst push notification- poll not works


I try to run the next simple code example on my mobilefirst 6.3 studio, and it doesn't works. It do nothing. What am I missing?

 WL.Server.createEventSource({
    name: 'PushEventSource1',
    poll: {
        interval: 3,
        onPoll: "test1"
    }
 });
 function test1() { 
    WL.Logger.info(new Date() + ": test!");
 }

I deploy it successfully:

[2015-02-09 10:23:02]             Starting adapter deployment on MobileFirst Server 
[2015-02-09 10:23:02]             Starting build of adapter: PushAdapter 
[2015-02-09 10:23:02]             Deploying adapter: PushAdapter 
[2015-02-09 10:23:02]             Server host: 10.0.0.177 
[2015-02-09 10:23:02]             Server port: 10080 
[2015-02-09 10:23:03]             Adapter build and deploy finished.

Solution

  • If by "not working" you mean that you do not see the log line in the server log, then make sure that in Eclipse, in the Servers view > Server Configuration > Logging section, the "Console log info" option is set to INFO.