Data Loader: Server Setup Instructions

Overview

This section describes how to install the data loader servlets needed for loading data into the MIM server via the MIM Excel Add-in program. All changes must be made as the LIM DBA user. The LIM DBA user is the owner of the MIM server process.

Specification

To run the Data Loader, the MIM Excel Add-in is installed on the client side. Please see the sections below in this chapter: the section called “Installing the MIM Excel Add-in” and the section called “How to Use the Data Loader” for more information on the MIM Excel Add-in installation and how to use the Data Loader once the web server setup is completed.

LIM recommends the use of the Jakarta web server. Other web servers may be used but the Jakarta servlet engine needs the least amount of configuration.

When installing the MIM Excel Add-in Release 2.4 or higher to load data you must also install the latest de-jakarta files on your server. For more information on the MIM Excel releases and the latest de-jakarta file, see the LIM Product Software Download page at: http://customers.lim.com/download/download_prodsoft.html. Java J2SE Version 1.4 (or higher) Software Developer Toolkit (SDK) is required (http://java.sun.com/j2se/downloads.html).

To check the Java version that is on your server, use the following command:

$ java –version

Downloading the Web Server and War File

Before setting up the Data Loader, first complete the de-jakarta Web server installation. Instructions on setting up the de-jakarta Web server are located in Apache Tomcat Web Server Installation.

The dataedit.war file is bundled with the de-jakarta Web server files.

Editing the “web.xml” File

The web.xml file was created after the web server has started and it extracts the dataedit files from the dataedit.war file. Edit the web.xml file using a text editor if you need to make changes to the web server parameters. The web.xml file is located at the following path:

~/de-jakarta/webapps/dataedit/WEB-INF/web.xml

Parameters

The parameters are listed below with the code from the web.xml file for each parameter. In order to change a parameter first remove the <!— and --> from in front and back of each parameter.

Default=localhost

<context-param>
  <param-name>mimhost</param-name> 
  <param-value>localhost</param-value> 
</context-param>

mimport: Replace the value 0 with the MIM port number.

Default=0

<context-param>
  <param-name>mimport</param-name> 
  <param-value>0</param-value> 
</context-param>

spoolarea: Replace the value val with the area that the servlets can use and temp space to write to.

Default=system’s default temp directory. On Unix, for example: /var/temp

<!--
<context-param>
  <param-name>spoolarea</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

limhome: Replace the value val with the path to the home directory of the MIM server.

Default=home directory of the user that is running jakarta

<!--
<context-param>
  <param-name>limhome</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

database: Replace the value val with the path to the database you are putting data into.

Default=~/data.cust/xmim.mim

<!--
<context-param>
  <param-name>database</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

prefix: Replace the value val with the prefix that will be pre-appended to all the symbols created.

Default=USER.

<!--
<context-param>
  <param-name>prefix</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

spooldir: Replace the value val with the directory for saving a copy of all update packages.

Default = home directory of the user that is running Jakarta/dldata

<!--
<context-param>
  <param-name>spooldir</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

configdir: Replace the value val with a directory name. The config directory is the directory for holding config files for data loading. pwfilename below is a config file.

Default = home directory of the user that starts Jakarta

<!--
<context-param>
  <param-name>configdir</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

pwfilename: Use this setting to restrict who can load data. Replace the value val with a filename. This file will be a flat file with usernames. (One name per line).

Default=dlusername

<!--
<context-param>
  <param-name>pwfilename</param-name> 
  <param-value>val</param-value> 
</context-param>
-->

Restarting the Web Server

Restart the web server for the changes to take affect by shutting the server down, then starting it back up.

$ cd ~/de-jakarta/bin
$ shutdown.sh
$ startup.sh

Creating and Starting the Customer Database

Now, create and start the customer database for data loading.

As the LIM DBA user, create the following directory names using the make_db_dirs script if they do not exist: To make the directories enter the following at a command prompt:

$ cd $LIMHOME
$ make_db_dirs data.cust

The following directories are created in the $LIMHOME directory:

~/data.cust, 
~/data.cust/xmim.mimdb
~/data.cust/xmim.mimdb/daily
~/data.cust/xmim.mimdb/tick
~/data.cust/xmim.mimdb/intraday

This directory will contain the database that is used for the Excel data loading. Edit the file:

~/.xmimrc

and add another database definition. Find the following line:

echo “database: $LIMHOME/data/xmim.mim”

Create the following line if it does not exist. Create it below the last database line that contains the path of your Excel data loading database:

echo “database: $LIMHOME/data.cust/xmim.mim”

Save and exit the file. The server must be restarted to make this database active. To start the server, type:

$ start.server