Getting Started with The Stibium Naming Server

Stibium 3.2.0

Dr Andrew Gray

Revision History
Revision 1.0020-Feb-2006AJG

First Draft.

Revision 2.0001-Aug-2006AJG

First public Stibium release.

Revision 3.00-Beta01-Nov-2006AJG

Stibium v3.0.0(Beta) release.

Revision 3.0001-Jan-2007AJG

Stibium v3.0.0 release.

Revision 3.1004-Aug-2007AJG

Stibium v3.1.0 release.

Revision 3.2020-Mar-2008AJG

Stibium v3.2.0 release.


Abstract

This guide describes how to install and run the Stibium web application, which operates under the Apache Tomcat web server. Stibium provides Java Naming and Directory Interfaces (JNDI) compliant naming services that are accessible via xml web services.

1. Initial Requirements

You will need the following:

  • One host machine, with the Apache Tomcat web server installed and working.

  • At least one client machine, to connect to the web server.

  • Both machines will need to have Java installed and ready for use[1].

  • A copy of the Stibium Naming Server Technical Manual[2].

The Tomcat web server can be obtained, together with instructions for installation and configuration, from the Apache Website. You should have an administrator account set up on the web server, and should configure it to run on the required ports and under the required protocols.[3]

If https is to be used, a keystore will be required on the web server, with a tomcat entry for use by SSL. See the Apache website's SSL Configuration : HOW-TO.

Tomcat Installation Options

There are two types of Tomcat installation - either as a normal executable, or on Windows as a 'Service'. These are available as different downloads from the Apache website.

The way that you start and stop Tomcat is different in these two modes. Also, because Windows services cannot directly launch user-interface forms, the way that the product is unlocked is also different in these two situations.

Starting and Stopping Tomcat as a Standard Executable

The Tomcat server can be started by using the appropriate startup script in the Tomcat installation's bin directory, it can be stopped using the shutdown script.

Starting and Stopping Tomcat as a Service

When the 'Service' version of Tomcat has been installed on a Windows machine, an 'Apache Tomcat' entry is added to the Start menus Program listing. To start Tomcat in this mode:

  1. Click on the 'Monitor Tomcat' program in the 'Apache' section.

  2. Right click on the new Apache icon that appears in the tray at the bottom left of the desktop.

  3. Click on the 'Start Service' option in the popup menu that appears.

Once You Have Started Tomcat

You should then be able to log in to the Tomcat administrator web page at the following url[4]:

http://<your-server-address>/manager/html

or

https://<your-server-address>/manager/html, if SSL is enabled on the web-server.

2. Downloading and Unpacking the Stibium Distribution

Before installing Stibium, you may wish to register on our website; this can be done using our on-line registration form. The Stibium distribution can then be downloaded from the following page:

http://www.rcrt.co.uk/downloads/downloads.jsp

You must be logged-in to access this page, a website password is provided as part of the registration process.

This distribution consists of a single Windows msi installer file: Stibium.msi,[5] the installer must be run on a Windows machine, where it will create and populate the necessary folders on the desktop, once this has been done the files can be moved to, and run on, any platform that supports Java.

3. Contents of the Stibium Distribution

If all is well, the file/directory structure created by the installer is as follows:

 --# Stibium-<version>
   |
   |-- ReadMe.txt
   |-- ReleaseNotes.txt
   |
   |--# client
   |  '-- StibiumClient.jar
   |
   |--# server
   |  '-- Stibium.war
   |
   |--# junit
   |  |
   |  |--# lib
   |  |  '-- StibiumJUnit.jar
   |  |
   |  |--# scripts
   |  |  '-- runJUnit.cmd
   |  |  '-- runInterop.cmd
   |  |
   |  '--# src 
   |     '-- (junit source files)
   |
   |--# dotnet
   |  '-- StibiumDotNetSetup.msi
   |
   |--# docs
   |  |-- StibiumGettingStarted.pdf
   |  |-- StibiumTechManual.pdf
   |  |-- StibiumJUnitTestSuites.pdf
   |  |-- StibiumDotNetGettingStarted.pdf
   |  |-- StibiumDotNetClientManual.pdf
   |  |-- StibiumNUnitTestSuitesDoc.pdf
   |  |
   |  '--# javadoc
   |     '-- (client & junit javadoc files)
   |
   |--# stibium-data
   |  |-- stibium-accounts.xml
   |  |-- stibium-config.xml
   |  |-- stibium-berry.xml
   |
   '--# thirdparty
      '-- (other jar archives required by clients)


3.1. client directory

This contains the StibiumClient.jar archive, which includes the RCRT.Stibium.naming.StibiumDirContext JNDI service provider required by client applications. This archive should be added to the classpath of any client applications that will use the Stibium service provider.

3.2. server directory

This contains the Stibium.war web archive. This is self-contained and does not need to be unpacked. It can be used as-is to install the Stibium web application directly onto a Tomcat web server.

Note

The web archive includes a set of xml data files ready to run the junit test suites.

3.3. junit directory

This contains three subdirectories: src, lib and scripts. The src directory contains the source code for the Stibium junit test suites, and the lib directory contains the StibiumJUnit.jar archive, which contains all the corresponding class files. The scripts directory contains the runJUnit.cmd script that is used to run the JUnit test suite under Windows, together with the runInterop.cmd script which runs the Java / .Net interoperability test, as described in the document: The Stibium .Net Client Library NUnit Test Suites.

3.4. dotnet directory

This contains the msi installer for the Stibium .Net client library and NUnit test suites.

3.5. docs directory

This contains the Stibium documentation, including javadoc-generated documentation for the relevant client and junit classes. The directory also contains pdf copies of the various manuals and 'getting started' guides.

3.6. stibium-data directory

This contains 'spare' copies of the xml data files used by the Stibium web application. This comprise: stibium-config.xml, stibium-accounts.xml, and stibium-berry.xml.

3.7. thirdparty directory

This contains all of the third-party libraries/archives that will need to be on the classpath of any Stibium client applications. These are mostly related to Apache Axis (v1.2.1).

4. Installing and Running the Stibium Web Application

Assuming that you have Apache Tomcat installed and working, and that you have downloaded, verified and unpacked the Stibium distribution archive, perform the following steps:

  1. Place the Stibium.war (web archive) file at a convenient location on the file system, where it will be accessible to the web server.

  2. Start Tomcat using the appropriate method, as described previously.

  3. Open the Tomcat manager web page, and log in:

    http://<your-server-address>/manager/html

  4. Deploy the Stibium web-application:

    Towards the bottom of the web page is a Deploy section, which contains a WAR File to Deploy selector. Click on the Browse button there, and navigate to the Stibium.war file. Select this file, and click on the Deploy button in the War File to Deploy box.

  5. All being well, Tomcat will now:

    1. Create a new Stibium subdirectory in its 'webapps' area,

    2. Unpack the web archive into this directory, and

    3. Start up the Stibium web application.

5. Checking Client-Server Connectivity

If the Stibium web application appears in the list of deployed applications on the Tomcat manager page, open your web browser and type in the following url to go to the Stibium installation home page, which should then appear as shown below:

http://<your-server-address>/Stibium/pages/home.jsp

Then, navigate to the Status Page, which will display a summary of the application statistics.

6. Unlocking the Stibium Software

Before the Stibium server will respond to client requests, it is necessary to install a software license. The way that this is done depends on whether Tomcat is running as a standard executable, or as a Windows Service.

Unlocking Stibium in a Standard Executable Version of Tomcat

This is done using the dialogs shown below. These are launched automatically if Stibium is started (within a non 'Service' environment) without a license in place[6].

This process is described in more detail on our web site, under 'Unlocking Software'.

If you are connected to the Internet when you perform the 'Unlock' process, you will receive automatically confirmation of your details by email.

Unlocking Stibium in a Windows Service Version of Tomcat

The license forms cannot be launched directly from within a Windows Service, so an alternative method is used, by making an entry in the stibium-config.xml file:

  1. Deploy Stibium under Tomcat as described previously - no license dialogs will appear.

  2. Stop Stibium using the Tomcat manager page - click on the 'Stop' link for Stibium in the 'Commands' area shown beneath 'Applications'.

  3. Open the stibium-config.xml file in a text editor. For a default installation, this is found at the following location within the Tomcat installation directory:

    <catalina_home>/webapps/Stibium/WEB-INF/stibium-data/stibium-config.xml

    where <catalina_home> refers to the Tomcat installation directory.

  4. Uncomment the xml 'license' element, and set your email address and license code in the relevant attributes, as shown below; then close the text editor.

  5. Restart Stibium using the 'Start' link for Stibium in the Tomcat manager page.

  6. When Stibium restarts the unlock process should run automatically, and take less than a minute.

  7. You can check the details of the license that has been installed by clicking on the 'License' link on the Stibium installation Home page.

An Example of a 'License' Element in stibium-config.xml


  <sc:license>
    <sc:email-address value='your.name@yourcorp.co.uk'/>
    <sc:unlock-code   value='TBUMA0A69GKVBDYLEABC'/>
  </sc:license>


7. Next Steps

Running the JUnit Test Suites

A series of JUnit test suites are included in the Stibium distribution, which can be used to check the behaviour of an installation. These are described in the document: The Stibium JUnit Test Suites.

Configuring Stibium

This is done by setting up the stibium-config.xml, stibium-accounts.xml and stibium-berry.xml files, as necessary. This process is covered in Chapter 4 of: The Stibium Naming Server Technical Manual.

Bibliography

SUN Microsystems. SUN JNDI Home Page.

Dr. Andrew Gray. RCRT. The RCRT Website.

The Apache Software Foundation. Apache Tomcat.

The Apache Software Foundation. Apache Tomcat, SSL Configuration: HOW-TO.



[1] We currently use Java jdk 1.6.0 and Apache Tomcat 5.5.23

[2] This manual is included in the Stibium distribution, and is also available on our website.

[3] The default ports for http and https are 80 and 443. It is also common practice to use ports 8080 and 8443 in development environments.

[4] Remember that unless you have reconfigured it, the server address should include the port ':8080' that is active.

[5] This archive is approximately 13MB in size, much of which is documentation.

[6] The email address that you provide is also used as a user account id, so if you register on our site before, or after unlocking any products, use the same email address.