J2EE web container configuration

This page lists the JNDI environment entries that must be present in FX Mobile's J2EE web container context.

FX Mobile's deployment descriptor (web.xml) contains definitions for the full set of required JNDI entries. The values in the deployment descriptor are not suitable for production use, and you must define your own values as part of deploying FX Mobile.

Set your own JNDI environmnt entries in your Servlet container's web application context for FX Mobile. Configure these enviroment entries so that they are not overriden by identically named entries in FX Mobile's web deployment descriptor.

JNDI entries

If any of the JNDI entries below are missing from the J2EE web container's context, then FX Mobile will raise an error.

Name Datatype Default Value Description
LIBERATOR.DOMAIN String caplin.com Domain on which the Liberator servers are deployed.
LIBERATOR.PRIMARY.ADDRESS String localhost Fully-qualified hostname of the primary Liberator server.
LIBERATOR.PRIMARY.PORT String 18080 Primary port of the primary Liberator server.
LIBERATOR.PRIMARY.HTTPS.PORT String 18081 HTTPS port of the primary Liberator server.
LIBERATOR.SECONDARY.ADDRESS String localhost Fully-qualified hostname of the secondary (failover) Liberator server.
LIBERATOR.SECONDARY.PORT String 18080 Primary port of the secondary (failover) Liberator server.
LIBERATOR.SECONDARY.HTTPS.PORT String 18081 HTTPS port of the secondary (failover) Liberator server.
KEYMASTER.LOCATION String servlet/StandardKeyMaster The URL of the KeyMaster servlet. The URL can be absolute or relative.
SESSION.POLL.LOCATION String servlet/Poll The URL of the KeyMaster poll servlet. The URL can be absolute or relative.
caplin.keymaster.privatekey.filename String private.pem Name of the private key that the KeyMaster servlet uses to sign authentication tokens.
caplin.keymaster.trade.mode.id String TradeMode Internal ID for permissions routing. Set to "TradeMode" unless instructed otherwise.
caplin.keymaster.view.mode.id String ViewMode Internal ID for permissions routing. Set to "ViewMode" unless instructed otherwise.
caplin.signon.view.mode.duration String 7200 Length of a view-mode session in seconds. When a view-mode session expires, the user is logged out of FX Mobile.
caplin.signon.trade.mode.duration String 900

Length of a trade-mode session in seconds. When a trade-mode session expires, the user's access level is downgraded to view mode. If the view-mode duration has also expired (see caplin.signon.view.mode.duration), the user is logged out of FX Mobile.

CAPLIN.DEV.MODE String false

Set to true to allow a liberator host and port to be specified at run time in the querystring of the web application URL. For example: "?liberatorHost=lib3.caplin.com&liberatorPort=18081".

Example configuration for Tomcat

This section shows an example configuration file for an FX Mobile web-application context in Apache Tomcat. 

The override attribute of each Environment element is set to false. This ensures that the values you define in the web container context are not overridden by values defined in FX Mobile's deployment descriptor (WEB-INF/web.xml). For more information on the override attribute, see The Context Container on the Apache Tomcat website.

<Context>
    <Environment name="LIBERATOR.DOMAIN" value="bank.com"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.PRIMARY.ADDRESS" value="lib1.bank.com"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.PRIMARY.PORT" value="18080"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.PRIMARY.HTTPS.PORT" value="18081"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.SECONDARY.ADDRESS" value="lib2.bank.com"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.SECONDARY.PORT" value="18080"
         type="java.lang.String" override="false" />
    <Environment name="LIBERATOR.SECONDARY.HTTPS.PORT" value="18081"
         type="java.lang.String" override="false" />
    <Environment name="KEYMASTER.LOCATION" value="servlet/StandardKeyMaster"
         type="java.lang.String" override="false" />
    <Environment name="caplin.keymaster.privatekey.filename" value="private.pem"
         type="java.lang.String" override="false" />
    <Environment name="caplin.keymaster.trade.mode.id" value="TradeMode"
         type="java.lang.String" override="false" />
    <Environment name="caplin.keymaster.view.mode.id" value="ViewMode"
         type="java.lang.String" override="false" />
    <Environment name="caplin.signon.view.mode.duration" value="7200"
         type="java.lang.String" override="false" />
    <Environment name="caplin.signon.trade.mode.duration" value="900"
         type="java.lang.String" override="false" />
    <Environment name="CAPLIN.DEV.MODE" value="false"
         type="java.lang.String" override="false" />
</Context>