+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Configure the Liberty profile for Application Center manually

After you deploy the Application Center EAR file, to configure WebSphere® Application Server Liberty profile manually for Application Center, we must modify the server.xml file.

In addition to modifications for the databases that are described in Manually installing Application Center, we must make the following modifications to the server.xml file.


Procedure

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

      <feature>jdbc-4.0</feature>
      <feature>appSecurity-2.0</feature>
      <feature>servlet-3.0</feature>
      <feature>usr:MFPDecoderFeature-1.0</feature>

  2. Add the following declarations for Application Center:

      <!-- The directory with binaries of the 'aapt' program, from the Android SDK's platform-tools package. -->
      <jndiEntry jndiName="android.aapt.dir" value="product_install_dir/ApplicationCenter/tools/android-sdk"/>
      
      <!-- Declare the IBM Application Center application. -->
      <application id="applicationcenter" 
                   name="applicationcenter"
                   location="applicationcenter.ear" 
                   type="ear"> 
        <application-bnd>
          <security-role name="appcenteradmin">
            <group name="appcentergroup"/>
          </security-role>
        </application-bnd>
        <classloader delegation="parentLast">           
        </classloader>
      </application>
      
      <!-- Declare the user registry for the IBM Application Center. -->
      <basicRegistry id="applicationcenter-registry"
                     realm="ApplicationCenter">
        <!-- The users defined here are members of group "appcentergroup",
             thus have role "appcenteradmin", and can therefore perform
             administrative tasks through the Application Center Console. -->
        <user name="appcenteradmin" password="admin"/>
        <user name="demo" password="demo"/>
        <group name="appcentergroup">
          <member name="appcenteradmin"/>
          <member name="demo"/>
        </group>
      </basicRegistry>

    The groups and users that are defined in the basicRegistry element are example logins, which we can use to test Application Center. Similarly, the groups that are defined in the <security-role name="appcenteradmin"> element are examples. For more information about how to modify these groups, see Configure the Java EE security roles on WebSphere Application Server Liberty profile.

  3. If the database is Oracle, add the commonLibraryRef attribute to the class loader of the Application Center application.

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

    The name of the library reference (OracleLib in this example) must be the ID of the library that contains the JDBC JAR file. This ID is declared in the procedure that is documented in Configure Liberty profile for Oracle manually for Application Center.

  4. Copy the Application Center EAR files to our Liberty server.

    • On UNIX and Linux systems:

        mkdir -p LIBERTY_HOME/wlp/usr/servers/server_name/apps
        cp product_install_dir/ApplicationCenter/console/*.ear LIBERTY_HOME/wlp/usr/servers/server_name/apps/

    • On Windows systems:

        mkdir LIBERTY_HOME\wlp\usr\servers\server_name\apps
        copy /B product_install_dir\ApplicationCenter\console\applicationcenter.ear 
        LIBERTY_HOME\wlp\usr\servers\server_name\apps\applicationcenter.ear

  5. Copy the password decoder user feature.

    • On UNIX and Linux systems:

        mkdir -p LIBERTY_HOME/wlp/usr/extension/lib/features
        cp product_install_dir/features/com.ibm.websphere.crypto_1.0.0.jar LIBERTY_HOME/wlp/usr/extension/lib/
        cp product_install_dir/features/MFPDecoderFeature-1.0.mf LIBERTY_HOME/wlp/usr/extension/lib/features/

    • On Windows systems:

        mkdir LIBERTY_HOME\wlp\usr\extension\lib
        copy /B product_install_dir\features\com.ibm.websphere.crypto_1.0.0.jar  
        LIBERTY_HOME\wlp\usr\extension\lib\com.ibm.websphere.crypto_1.0.0.jar
        mkdir LIBERTY_HOME\wlp\usr\extension\lib\features
        copy /B product_install_dir\features\MFPDecoderFeature-1.0.mf  
        LIBERTY_HOME\wlp\usr\extension\lib\features\MFPDecoderFeature-1.0.mf

  6. Start the Liberty server.


What to do next

For more steps to configure Application Center, see Configure the Java EE security roles on WebSphere Application Server Liberty profile.

Parent topic: Deploy the Application Center EAR file and configuring the application server manually