All the command line examples below are designed for use with JINI 2.1. To make these command-lines work with JINI 2.0 substitute jsk-platform.jar
for jsk-lib.jar
Before you can configure and use the support for ServiceUI, you must download the ServiceUI v1.1 binaries (and source if you desire) from here (note that you'll need a JINI.org login account).
To use the example config files provided in the Blitz distribution, unpack the ServiceUI distribution and copy the serviceui-1.1.jar to <blitz_root>/thirdpartylib where <blitz_root> is the root directory in which you've installed the Blitz distribution.
To use Dashboard as a ServiceUI, we must make additions to classpath and codebase, after which we must modify the initial attributes for the Blitz proxy.
First we change the codebase in the start .config
to add the Blitz ServiceUI .jar
:
private static codebase = ConfigUtil.concat(new Object[] { "http://", ConfigUtil.getHostName(), ":", codebasePort, "/", "blitz-dl.jar"});
to:
private static codebase = ConfigUtil.concat(new Object[] { "http://", ConfigUtil.getHostName(), ":", codebasePort, "/", "blitz-dl.jar", " ", "http://", ConfigUtil.getHostName(), ":", codebasePort, "/", "blitzui.jar", " ", "http://", ConfigUtil.getHostName(), ":", codebasePort, "/", "backport-util-concurrent50.jar" // Or the JDK 1.4 version (remove the "50") });NOTE: You will need to ensure the backport
.jar
is in the directory your codebase server distributes .jar
s from.
Then we modify the classpath to add both the Blitz ServiceUI .jar and the ServiceUI library .jar:
static classpath = ConfigUtil.concat(new Object[] { jiniRoot, "jsk-lib.jar", separator, jiniRoot, "sun-util.jar", separator, dbLib, separator, blitzLib, "blitz.jar"});
to:
static classpath = ConfigUtil.concat(new Object[] { jiniRoot, "jsk-lib.jar", separator, jiniRoot, "sun-util.jar", separator, dbLib, separator, blitzLib, "blitz.jar", separator, blitzLib, "blitzui.jar", separator, otherLib, "serviceui-1.1.jar"});
The initial registration attributes are set using the initalAttrs
configuration variable in the blitz.config
file - we must add some imports:
import net.jini.core.entry.Entry; import org.dancres.blitz.serviceui.DashboardUI;
and the appropriate variable setting:
initialAttrs = new Entry[] {org.dancres.blitz.serviceui.DashboardUI.getUIDescriptor()};
For these changes to take effect, you must shutdown the Blitz instance if it's currently running, delete any log and state files (as specified by the logDir
and persistDir
variables) and then restart Blitz with the changes made as above.