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
- Rational License Key Server 8.1.4.8 or later must be installed and configured. The network must allow communication to and from MobileFirst Server by opening the two-way communication ports (lmrgd and ibmratl). For more information, see Rational License Key Server Portal and How to serve a license key to client machines through a firewall.
- Make sure that the license keys for IBM MobileFirst™ Platform Foundation are generated . For more information about generating and managing your license keys with IBM® Rational License Key Center, see IBM® Support - Licensing and Obtaining license keys with IBM Rational License Key Center.
- MobileFirst Server must be installed and configured with the option Activate token licensing with the Rational License Key Server on your Liberty profile as indicated in Installation overview for token licensing.
Parent topic: Install and configure for token licensing
Install Rational Common Licensing libraries
Procedure
- 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.
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
- 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.
- 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).
- 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.
- 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>
- 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>
- 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.
- 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.