+

Search Tips | Advanced Search

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


Connecting MobileFirst Server installed on WebSphere Application Server Liberty profile to the Rational License Key Server

You must install the Rational® Common Licensing native and Java™ libraries on the Liberty profile before you connect MobileFirst Server to the Rational License Key Server.


Before you begin

Parent topic: Install and configure for token licensing


Install Rational Common Licensing libraries


Procedure

  1. Define a shared library for the Rational Common Licensing client. This library uses native code and can be loaded only once by the application server. Thus, the applications that use it must reference it as a common library.

    1. Choose the Rational Common Licensing native library. Depending on your operating system and the bit version of the Java Runtime Environment (JRE) on which your Liberty profile is running, we must choose the correct native library in product_install_dir/MobileFirstServer/tokenLibs/bin/your_corresponding_platform/the_native_library_file. For example, for Linux x86 with a 64-bits JRE, the library can be found in product_install_dir/MobileFirstServer/tokensLibs/bin/Linux_x86_64/librcl_ibmratl.so.
    2. Copy the native library to the computer that runs MobileFirst Server administration service. The directory might be ${shared.resource.dir}/rcllib. The ${shared.resource.dir} directory is usually in usr/shared/resources, where usr is the directory that also contains the usr/servers directory. For more information about standard location of ${shared.resource.dir}, see WebSphere® Application Server Liberty Core - Directory locations and properties. If the rcllib folder does not exist, create this folder and then copy the native library file over.

      Note: Ensure that the Java virtual machine (JVM) of the application server has both read and execute privileges on the native library. On Windows, the following exception appears in the application server log if the JVM of the application server does not have the executable rights on the copied native library.

        com.ibm.rcl.ibmratl.LicenseConfigurationException: java.lang.UnsatisfiedLinkError: rcl_ibmratl (Access is denied).

    3. Copy rcl_ibmratl.jar file to ${shared.resource.dir}/rcllib. The rcl_ibmratl.jar file is a Rational Common Licensing Java library that can be found in product_install_dir/MobileFirstServer/tokenLibs directory.

      Note: The Java virtual machine (JVM) of Liberty profile must have the possibility to read the copied Java library. This file must also have readable privilege (at least for the application server process) in your operating system.

    4. Declare a shared library that uses the rcl_ibmratl.jar file in the ${server.config.dir}/server.xml file.

        <!-- Declare a shared Library for the RCL client. -->
        <!- This library can be loaded only once because it uses native code. -->
        <library id="RCLLibrary">
          <fileset dir="${shared.resource.dir}/rcllib" includes="rcl_ibmratl.jar"/>
        </library>

    5. Declare the shared library as a common library for the MobileFirst Server administration service application by adding an attribute (commonLibraryRef) to the class loader of the application. As the library can be loaded only once, it must be used as a common library, and not as a private library.

        <application id="mfpadmin" name="mfpadmin" location="mfp-admin-service.war" type="war">
          [...]
          <!- Declare the shared library as an attribute commonLibraryRef to 
              the class loader of the application. -->
          <classloader delegation="parentLast" commonLibraryRef="RCLLibrary">
          </classloader>
        </application>

      If you are using Oracle as database, then the server.xml will already have the following class loader:

        <classloader delegation="parentLast" commonLibraryRef="MobileFirst/JDBC/oracle">
        </classloader>

      You also need to append Rational Common Licensing library as common library to the Oracle library as follows:

        <classloader delegation="parentLast"
             commonLibraryRef="MobileFirst/JDBC/oracle,RCLLibrary">
        </classloader>

    6. Configure the access to the Rational Common Licensing library by the JVM of your application server. For any operating systems, configure the ${wlp.user.dir}/servers/server_name/jvm.options file by adding the following line:

      -Djava.library.path=Absolute_path_to_the_previously_created_rcllib_folder

      Note: If you move the configuration folder of the server on which the administration service is running, we must update the java.library.path with the new absolute path.

    The ${wlp.user.dir} directory is usually in liberty_install_dir/usr and contains the servers directory. However, it's location can be customized. For more information, see Customizing the Liberty environment
  2. Configure MobileFirst Server to access Rational License Key Server.

    In the ${wlp.user.dir}/servers/server_name/server.xml file, add these JNDI configuration lines.

      <jndiEntry jndiName="mfp.admin.license.key.server.host" value="rlks_hostname"/> 
      <jndiEntry jndiName="mfp.admin.license.key.server.port" value="rlks_port"/> 

    • rlks_hostname is the host name of the Rational License Key Server.
    • rlks_port is the port of the Rational License Key Server. By default, the value is 27000.

    For more information about the JNDI properties, see JNDI properties for Administration Services: licensing.


Install on Liberty profile server farm

For configuring the connection of MobileFirst Server on Liberty profile server farm, we must follow all the steps that are described in Install Rational Common Licensing libraries for each node of your server farm where the MobileFirst Server administration service is running. For more information about server farm, see Server farm topology and Install a server farm.