Installing the SmartRouting Server component

The Geoconcept Web installer offers to install two versions of SmartRouting Server:

  • JEE SmartRouting,
  • SmartRouting Command Line.

These versions are independent of one another, and serve different purposes. For example, the JEE SmartRouting component is needed for the “Route Calculation” widget.

Deployment of the native libraries

For Windows

The libraries are loaded explicitly from the sub-directory corresponding to the individual environment (32/64 bits) of the external directory configured (RootDirectory) for the local provider (ConnectionMode="LocalDll").

Deployment under Linux

Only libraries linked dynamically are currently available.

Installation for utilisation of dynamically linked libraries

Loading libraries of dependencies linked dynamically requires that the system variable LD_LIBRARY_PATH contains the libraries that will be used. The way to assign the environment variable LD_LIBRARY_PATH depends on the shell, the start-up mode for the application server, etc. In the same way, the value assigned will vary depending on the host OS, the deployment directory, the loading mode (described below).

For example, for a manual start-up of tomcat via sh or compatible (bash, etc) the user enters export LD_LIBRARY_PATH=/home/smartrouting/native/linux32-x86/debian/3.1/dynamic or export LD_LIBRARY_PATH=/deploy/smartrouting/native/linux64-amd64/red-hat/5.6/dynamic then startup.sh of the tomcat bin directory (the variable is assigned for the session).

It is also possible to modify the catalina.sh file in order to define the LD_LIBRARY_PATH variable for all the tomcat start-ups, or again to modify the /etc/rc.d/.. files for an automated execution.

The service.xml file located in the conf directory of the hierarchical tree external to the application server (%smartrouting%) defines the loading mode for native libraries (under Linux exclusively since under Windows the mode is still the same) in the native-libraries section.

<?xml version="1.0" encoding="UTF-8"?>
<service>
  [...]
  <native-libraries>
    <log-enabled>false</log-enabled>
    <always-detect>true</always-detect>
    <detect-method>auto</detect-method>
    <last-detect />
    <!--force loading libraries from given directory under ugc/native eg 'linux64-amd64/my-dir' : -->
    <dir></dir>
    <link-mode>dynamic</link-mode>
  </native-libraries>
    […]

The directory from which the resource adaptor (of the ConnectionMode="LocalDll" type) will load the libraries is defined either automatically (by detection) or it can be configured manually. It is the value of the dir element that will determine this: if it is defined and is not empty, then it is the value of the element that will be used as a sub-directory of the native directory of the hierarchical tree external to the application.

[Note] Note

If dir is set to a value of «mydir/test» and the RootDirectory of the resource adaptor is set to a value of «/home/smartrouting» then the directory used for the loading event will be /home/smartrouting/native/mydir/test.

In the event that dir is defined (loading is explicitly forced), the parameters that configure the automated loading by detection will have no effect: link-mode, detect-mode, always-detect.

Where loading is automated loading by detection (dir is undefined or empty), the sub-directory of the native directory of the hierarchical tree that is external to the application server that will be used will depend on:

  • the linux (32/64) environment,
  • the linux distribution (debian, red hat),
  • the version of the linux distribution,
  • the link mode for libraries (static/dynamic) - currently only dynamic mode is available.

Whatever the mode used to define the directory to be used (deliberately forced via native-libraries/dir or automatically detected), in dynamic link mode (only), it will be essential that the environment variable LD_LIBRARY_PATH contains this directory.

Deployment and configuration of the application server

Please refer to the section 'Configuration for SmartRouting JEE' in the Geoconcept Web manual.