Skip to main content
This section explains how to test and validate that jPOS is integrated with the Futurex HSM. Before starting this section, install and configure jPOS Template per your specific requirements.
Check out Supported commands if you would like to see a table of commands supported by the ExcryptAdapter.If you would like to see some working Java code examples of common operations, check out Common operations.

Q2 Overview

Q2 is the jPOS runtime environment that runs and manages jPOS’ services called QBeans. When you start Q2, it reads configuration files in the deploy/ directory, loads the corresponding Java classes, and keeps them running. For HSM integration, Q2 starts the ExcryptAdapter QBean defined in 20_excrypt.xml, connects it to the HSM, and manages its lifecycle. Q2 also supports hot‑deployment — if you add or modify a QBean XML in deploy/, it loads or updates the service without restarting the runtime.

jPOS connection validation

To test the installation, in the directory where you built the jPOS template, run the following command:
Shell
While the service is running, look for a log entry similar to this:
None
If that log entry is found, jPOS successfully communicated with the Futurex Excrypt HSM. If not, troubleshoot by verifying the connection settings in 20_excrypt.xml to ensure they match your HSM’s configuration.

CLI commands

The library provides a set of CLI commands that help with troubleshooting and configuration tasks. Please see section 7.1.1 in the jPOS Programmer’s Guide for further information on the jPOS command line interface.

ENCRYPT

Encrypts the text provided. Useful when used in combination with the hsm:: prefix to secure sensitive configuration values such as encryption keys or passwords.

Format:

None

Example:

Shell

GENKCV

Calculates the check digits for the given key.

Format:

None

Example:

Shell

GENKEY

Generates a new random key encrypted under the LMK.

Format:

None

Example:

Shell

GENWKEY

Generates a new working key.

Format:

None

Example:

Shell

VERSION

Shows the HSM version.

Format:

None

Example:

Shell