Upgrading projects to work in session-independent mode

Upgrading projects that were session-dependent in previous versions so that they work with IBM MobileFirst™ Platform Foundation V7.1.0 in session-independent mode.

About this task

Session-independent mode was introduced as the default mode for MobileFirst Server, starting with V7.1.0. For more information about session-independent mode, see Session-independent mode.

Note: Clients that were created using a version of IBM MobileFirst Platform Foundation earlier than V7.1.0 do not work with a MobileFirst Server that is operating in the new session-independent mode. So, to serve users who are using the session-independent mode, as well as existing users who are using session-dependent mode, you must deploy the new V7.1.0 WAR with its V7.1.0 artifacts, but WITHOUT removing the old WAR.
Tip: If you choose to move all your users to session-independent mode, for instance, to enable IT to scale down servers dynamically, you may consider remotely disabling the old apps in the old WAR.

Procedure

  1. Import your old project into MobileFirst Studio V7.1.0. Alternatively, if you are using MobileFirst Platform Command Line Interface, make sure you have V7.1.0 installed, then run the mfp push command.
  2. Inspect the settings for the session dependency properties in the worklight.properties file of your project.
    Ensure that the following parameters appear and are configured as shown:
    • mfp.session.independent=true.
    • mfp.attrStore.type=database. Other options are: extremescale and datacache (if you are using Bluemix®). Make sure that mfp.attrStore.type is not set to HttpSession, which does not work in session-independent mode.

    For more information, see Configuring session dependency.

  3. Inspect the expiration settings of the built-in realms in the worklight.properties file.
    Ensure that the following parameters appear. Either set a positive expiration value for each, or use the following default values:
    wl.realm.expiration.directUpdate=3600
    wl.realm.expiration.remoteDisable=300
    wl.realm.expiration.deviceAutoProvisioning=3600
    wl.realm.expiration.deviceNoProvisioning=3600
    wl.realm.expiration.antiXSRF=3600
    wl.realm.expiration.authenticity=3600
    wl.realm.expiration.anonymousUser=3600
  4. Inspect the loginModule elements in the authenticationConfig.xml file of your project. Change the expirationInSeconds attribute value from -1 to your desired realm expiration, or completely remove this attribute to use a default expiration of 3600 seconds. For more information, see Configuring login modules.
  5. Ensure that the apps in your project conform to the requirements in the section "Developing apps to work in IBM MobileFirst Platform Foundation V7.1.0" under Session-independent mode.