0

Platform specific packages in an heterogeneous community

It is possible to create and execute a package that will output configuration information to the community publisher in the form of a return-receipt. A report of the results from each peer can be generated using the Everserve web interface running on the publisher or any SQL reporting toolset.

In a heterogeneous environment, the logic of this package will determine which operating system is running on the peer prior to executing the appropriate script. The java utility class provide by this example contains such logic. It uses the Java System properties to determine the OS and then runs an OS specific script.

Dowload utility class and package file

The class file and scripts (win.bat, solconfig.sh and OSscript.class) should be copied to the publisher's server directory. The xml package specification should be copied to the server/Packages directory.

An Everserve package delivered to execute the java program is included below. The package would include the necessary script files, the java class, and a call to execute the java class. The following example package-spec will work for both Windows and Unix:

<?xml version="1.0" ?>
<!DOCTYPE spec-container SYSTEM "package-spec.dtd">
<spec-container name="ospkg" version="false" delta="false" >
<spec-version version="1.0" earliest="1.0"/>
<!-- deliver each script -->
<file-spec source="winconfig.exe" target="win.bat" />
<file-spec source="solconfig.sh" target="solconfig.sh" />
<!-- deliver and execute the java program -->
<file-spec source="OSscript.class" target="OSscript.class " />
<command-spec commandline="java -classpath . OSscript" />
</spec-container >

The scripts that are copied by the Everserve package and called by the Java program can be customized to include any platform-specific commands you might want to execute. Included in the download are two sample scripts which gather some general information. Add the details that are needed for your work.



Copyright 2000-2002 © Synchron Networks, Inc.