As long as your PATH/LD_LIBRARY_PATH and
CLASSPATH environment variables are correctly set up, it should be straightforward to run the examples.
Examples.jar or
ASPaint.jar must be appended to your
CLASSPATH depending upon which example you are running. For example, on a Microsoft Windows platform, you might set your
CLASSPATH variable as follows:
If any additional jar files need to be appended to your CLASSPATH for running an example, the section on that example will have the additional information.
After your CLASSPATH is set appropriately, you can invoke all of the Java examples by using the following basic command:
For example, to run ASOperations with the default settings, enter:
See Command Line Arguments for information on the command line arguments that you can use when invoking the examples.
where class_name is the name of the example class. For example:
ASOperations is the default class for the jar file and can be launched directly using
-capacity entries_per_seeder where
entries_per_seeder specifies the number of entries per seeder; -1= infinite (default)
The default metaspace name used by all of the examples is ms. Since the default discovery URL is
tibpgm, conflicts might occur when multiple users are on the same network and using the default metaspace
ms. Therefore, it is recommended that when running the examples, you specify a unique metaspace name on the command line using the
-metaspace command line option.
The default discovery URL used by all of the examples is tibpgm. This means that the PGM transport is used by ActiveSpaces applications (peers) to “discover” each other. If multiple versions of ActiveSpaces are being used on the same network, message deserialization errors can occur, because the message formats are typically not compatible between the various versions of ActiveSpaces.
When tibpgm is specified as the discovery URL, the default destination port used is 7888. To prevent conflicts when multiple versions of ActiveSpaces are being used with PGM as the discovery transport, it is recommended that a unique discovery URL be specified on the command line using the
-discovery command line option.
Unless otherwise noted, the default space (myspace) that is defined for use by the examples has a definition consisting of three fields: