MobileFirst 推送通知 - 轮询不起作用
MobileFirst push notification- poll not works
我尝试 运行 我的 mobilefirst 6.3 studio 上的下一个简单代码示例,但它不起作用。它什么都不做。
我错过了什么?
WL.Server.createEventSource({
name: 'PushEventSource1',
poll: {
interval: 3,
onPoll: "test1"
}
});
function test1() {
WL.Logger.info(new Date() + ": test!");
}
我部署成功:
[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.
如果 "not working" 你的意思是你没有在服务器日志中看到日志行,那么请确保在 Eclipse 中,在服务器视图 > 服务器配置 > 日志记录部分,"Console log info" 选项设置为 INFO
.
我尝试 运行 我的 mobilefirst 6.3 studio 上的下一个简单代码示例,但它不起作用。它什么都不做。 我错过了什么?
WL.Server.createEventSource({
name: 'PushEventSource1',
poll: {
interval: 3,
onPoll: "test1"
}
});
function test1() {
WL.Logger.info(new Date() + ": test!");
}
我部署成功:
[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.
如果 "not working" 你的意思是你没有在服务器日志中看到日志行,那么请确保在 Eclipse 中,在服务器视图 > 服务器配置 > 日志记录部分,"Console log info" 选项设置为 INFO
.