The server deployment descriptor describes the various parameters needed by the ORB to start your server within a Java VM. When using the command line utilities, it is expressed as a properties file. When working with the Activation System APIs, the ServerDesc is a regular serializable Java object.Server Descriptor Class
package com.sssw.jbroker.api.activation; import java.io.Serializable;
public class ServerDesc implements Serializable
{
private String _mainClass;
private String _alias;
private String[] _classPath;
private String[] _args;
private String[] _vmFlags;
private String _logDir;public ServerDesc(String mainClass, String alias, String[] classPath,
String[] args, String[] vmFlags, String logDir)
throws ActivationException
{
| _mainClass = mainClass;
| _alias = alias;
| _classPath = classPath;
| _args = args;
| _vmFlags = vmFlags;
| _logDir = logDir;
}public final String getClassName() { return _mainClass; }
public final void setClassName(String main) { _mainClass = main; }public final String getAlias() { return _alias; }
public final void setAlias(String alias) { _alias = alias; }public final String[] getClassPath() { return _classPath; }
public final void setClassPath(String[] cp) { _classPath = cp; }public final String[] getArgs() { return _args; }
public final void setArgs(String[] args) { _args = args; }public final String[] getVmFlags() { return _vmFlags; }
public final void setVmFlags(String[] flags) { _vmFlags = flags; }public final String getLogDir() { return _logDir; }
public final void setLogDir(String logDir) { _logDir = logDir; }
}Server Descriptor as Properties
It is convenient to express the server as a properties file. The following properties can be specified.
Property Name Property Description server.main This property specifies a fully qualified name of the class with a public static void main(Sting[]) method. This method is given control by the ORB when the server is activated. [REQUIRED] server.alias This property specifies a user choosen name that is unique within the Activation System. This name can later be used on several activation utilities and as parameter to the ORB. [REQUIRED] server.classpath This property specifies a space separated list of classpath elements that are needed by the server to run. A full classpath is constructed by jorbd by prefixing the path with ORB and JDK classes. server.args This property specifies a space separated list of arguments to be passed on the command line to the server. The main method of the server will get the argument list as parameters when the server starts up. server.vmflags This property specifies a space separated list of flags to be passed to the Java VM that is started by the server. You can specify flags like -D, -ms, -mx, etc. server.logdir The ORB automatically redirects the System.out and System.err streams of the ORB started servers to files under the db/logs directory. This directory can be over-ridden by specifying a fully qualified path to a directory of your choice. Example:
#Fri Mar 26 13:04:49 PST 2003
server.main=poaBank.Server
server.vmflags=
server.logdir=/home/user1/orb/db/logs
server.args=/home/user1/orb/examples/src/poaBank/db
server.classpath=/home/user1/orb/examples/lib
server.alias=bank
Copyright © 1998-2003, Novell, Inc. All rights reserved.