Worklight 6.1, testing in WL Studio on a Mac.
As a follow-up to this question concerning doing background work in a Worklight Server, the accepted answer to which is to use an Event Source.
WL.Server.createEventSource(
{
name: "housekeepingEventSource",
poll: {
interval: 5,
onPoll: workToBeDone
},
securityTest: "eventTest"
}
);
The issue concerns which security test to use. Whatever I try I get this error:
Adapter deployment failed: Wrapped java.lang.ClassCastException: org.mozilla.javascript.gen._ (... elisions ...) _chmSecurityService_impl_js_83 cannot be cast to java.lang.String (/integration.js#258)
Referencing this question
I've used this security test:
<mobileSecurityTest name="eventTest">
<testUser realm="wl_anonymousUserRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
Hints please ...