8.4 Calling XMA by Command-Line

An XMA application can be started directly by a Java call to the at.spardat.xma.Launcher class which implements a main() method.:

java at.spardat.xma.Launcher <component-url> [<name> <value>[<name> <value>]*]

Example:

java at.spardat.xma.boot.Launcher http://localhost:8080/jndiTest/Test param1 value1

Note that in this case the <component-url> has to be stated without the ending .xma.

Usually calling this class directly by oneself is too cumbersome as the classpath and certain system properties have to be set. Therefore the XMA-Boot-Runtime offers an executable (Windows) and a script (Linux), which launches this class.

XMA-Application or Components can also be started via executable-wrappers which launch the class at.spardat.xma.Launcher. This enables the call of XMA-components from desktop shortcuts, other executables, shell-scripts or batch-jobs.

This wrapper is platform dependent. On windows installations we use a windows executable. This executable xma.exe is installed with the XMA Boot-Runtime. Under Linux a script xma.sh is used.

The wrapper supplied with the XMA-Boot runtime is called according to the Java command, parameters are separated by blanks:

xma.exe <component-url> [<name> <value>[<name> <value>]*]

Example:

xma.exe http://localhost:8080/xma_simplesample/CustomerSearch idCustomer 123

Note that in this case the <component-url> has to be stated without the ending .xma.

This technique can be used to start XMA applications from scripts, desktop-icons, the program-menu or to integrate XMA applications into client side applications which are able to issue system commands. An XMA application started by a command line call is not able to return any values. It is also not possible that the caller waits (blocks) until the Xma application is finished if called by command line.

The wrapper for Windows, xma.exe, is created by Launch4J.