+

Search Tips   |   Advanced Search

Manually configure Liberty profile for MobileFirst Server administration

In addition to modifications for the databases, make the following modifications to the server.xml file.

In the following procedure, when the example uses the worklight.war file name, use the name of the project. for example, myProject.war.

  1. Ensure that the <featureManager> element contains at least the following <feature> elements:

      <feature>ssl-1.0</feature>
      <feature>servlet-3.0</feature>
      <feature>jdbc-4.0</feature>
      <feature>jndi-1.0</feature>
      <feature>restConnector-1.0</feature>
      <feature>appSecurity-1.0</feature>

  2. Configure the secure JMX connection.

  3. Add the following global JNDI entries in server.xml:

      <jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
      <jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
      <jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
      <jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="WorklighRESTUserPassword"/>
      <jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
      <jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>

      Where:

    • Modify the web container definition with the following values:

        <webContainer invokeFlushAfterService="false" deferServletLoad="false"/>

    • Copy the following WAR files to the apps directory of the liberty server:

        MF_HOME/WorklightServer/worklightadmin.war and MF_HOME/WorklightServer/worklightconsole.war

      The apps directory is in the same directory as server.xml.

    • Declare the administration services and operations console applications:

           <application id="worklightadmin" 
                        name="worklightadmin" 
                        location="worklightadmin.war" 
                        type="war">
        
                <application-bnd>
                     <security-role name="worklightadmin"> </security-role>
                     <security-role name="worklightdeployer"> </security-role>
                     <security-role name="worklightmonitor"> </security-role>
                     <security-role name="worklightoperator"> </security-role>
                </application-bnd>
        
            <classloader delegation="parentLast">
                <commonLibrary>
                    <fileset dir="${wlp.install.dir}/lib" 
                             includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
                </commonLibrary>
            </classloader>
        
            </application>
        
                <application id="worklightconsole" 
                             name="worklightconsole" 
                             location="worklightconsole.war" 
                             type="war">
        
                  <application-bnd>
                      <security-role name="worklightadmin"> </security-role>
                      <security-role name="worklightdeployer"> </security-role>
                      <security-role name="worklightmonitor"> </security-role>
                      <security-role name="worklightoperator"> </security-role>
                </application-bnd>
        
            </application>
        
        <jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" 
                  value='"*://*:*/worklightadmin"'/>
        

      See Configure a user registry for the Liberty profile.

      The JNDI property...

        worklightconsole/ibm.worklight.admin.endpoint

      ...is prefixed by the context root of the operations console application, in this example worklightconsole. The value of this property is the end point to the MobileFirst administration. The syntax...

        *://*:*/worklightadmin

      ...means that the URL is the same as the one used to contact the operations console. The context root of the operations console is replaced by worklightadmin. We could also specify the full endpoint, for example:

        http://myhostname.mydomain.com:9080/worklightadmin

    • If the database is Oracle, add the commonLibraryRef attribute to the class loader of the worklightadmin application.

        ...
        <classloader delegation="parentLast" 
                     commonLibraryRef="OracleLib">
          <commonLibrary>
        ...

      OracleLib is the ID of the library containing the JDBC JAR file.


Parent topic: Manually deploy administration services and operations console