J2EE web container configuration

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

The JNDI environment entries store low-level configuration:

  • the host and ports of the the primary and secondary Liberator servers
  • the URL of the KeyMaster servlet
  • developer mode activation

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.

JNDI environment entry resources (entries relative to java:comp/env)
Name Datatype Example Value Description
LIBERATOR.DOMAIN String bank.com Domain on which the Liberator servers are deployed.
LIBERATOR.PRIMARY.ADDRESS String lib1.bank.com 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 lib2.bank.com 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.
LIBERATOR.URLS String ['rttp://lib1.bank.com:18080', 'rttp://lib2.bank.com:18080'] A JavaScript-formatted array of the liberator URLs to use when establishing the first connection to a Liberator. If only one Liberator URL is specified, and a connection to that Liberator fails, then a connection to a failover Liberator (if defined) will not be attempted. 
KEYMASTER.LOCATION String servlet/StandardKeyMaster The URL of the KeyMaster 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.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

The example in this section shows the required JNDI entries formatted for an Apache Tomcat web context.

Note that each Environment element has an override attribute set to "false". This prevents the environment entry's value from being overriden by an environment entry defined in FX Mobile's deployment descriptor (WEB-INF/web.xml).

For more information on configuring an Apache Tomcat web context, 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="LIBERATOR.URLS" value="['rttp://lib1.bank.com:18080','rttp://lib2.bank.com:18080']"
         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.DEV.MODE" value="false"
         type="java.lang.String" override="false" />
</Context>