The regserv utility is used to register a server with the ORB so that it can be auto-started.
regserv [options1] -desc <properties filename>
regserv [options2] -alias <server alias> -main <server class name>
where options1 include:
-J<runtime flag> Pass argument to the java interpreter
-start Start the server after registering
where options2 include:
-J<runtime flag> Pass argument to the java interpreter
-args <arg list> Arguments to the server main
-vmflags <flag list> Arguments to the server Java VM
-classpath <path list> Specify where to find server classes
-logdir <dir> Specify where to write server logs
-start Start the server after registering
The ORB supports automatic server activation
for persistent objects via its ActivationSystem
API. For convenience several utilities are provided. The regserv
utility is used to register servers. A server is described by a Server
Deployment Descriptor (see ServerDesc),
which gives all the information to the ORB to start a Java VM. It includes
the name of the main class, arguments to the Java VM, command line arguments
to your main, and classpath. The classpath need not contain the JDK or
ORB classes. The server deployment descriptor can also contain a directory
name where server's System.out
and System.err
streams are automatically
redirected.
-start
Specifies that after the server is registered, it should be activated. If the server is not started now, you can later ask the ORB to start it by using the startserv utility, or you can (manually) start the server on the command line by passsing it a -ORBServerAlias property or parameter.
-JruntimeFlag
Used to pass runtime flags to the Java interpreter/runtime. For example, in conjunction with the -D option, it sets a Java System property. Muliple -J arguments can be used to specify more than one runtime flags.
-desc propertiesFile
Specifies the name of the file that contains the server deployment descriptor specified as a properties file.
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. -alias serverAlias
Specifies a name that uniquely identifies this server within the ActivationSystem. This name can later be used on various other activation utilities.
-main mainClass
Specifies a fully qualified class name with a public static void main(String[]) method. This method is given control by the started Java VM when the server is started.
-args arg1 arg2 ... argn
Specifies the arguments to be passed on the command line to the started server. If an argument starts with a dash ('-'), then, use two dashes instead ('--').
-vmflags flag1 flag2 ... flagn
Specifies the flags to be passed to the started Java VM. If an flag starts with a dash ('-'), then, use two dashes instead ('--').
-classpath path1 path2 ... pathn
Specifies the path to the classes that the server depends on. The user specified classpath is appended to the JDK classpath and the ORB classpath to construct the full classpath for the started Java VM.
-logdir directoryName
The ORB automatically redirects the
System.out
and theSystem.err
streams of started servers to thedb/logs
directory. The out stream is named <server alias>.out and the err stream is names <server alias>.err. This argument specifies the override for the log directory name.
If the JBROKER_INITIAL_URL
environment
variable is set, then its value is used to locate the ActivationSystem.
For example on Win32:
set JBROKER_INITIAL_URL=iiopboot://hubble:2506
will make the regserv utility register the
server with the jorbd running on host hubble
instead of the local
host.
Note: This can also be achieved by using
-J-DORBDefaultInitRef=iiopboot://hubble
as one of the parameter
to chngserv and is actually preferred to setting an environment property.
Register server MyServer (with Activation System
running on host yosemite). Server main class is com.foobar.MyServer
,
arguments are "-debuglevel 2". The classes for the server are in
the /myServer/classes
directory accessible from host yosemite
.
regserv -J-DORBDefaultInitRef=iiopboot://yosemite -alias MyServer -main com.foobar.MyServer -args --debuglevel 2 -classpath /myServer/classes
Ask the ORB to start MyServer.
startserv -alias MyServer
Manually start MyServer.
java -classpath /myServer/classes:/opt/MP/lib/mp-orb.jar -mx32M -DORBServerAlias=MyServer com.foobar.MyServer -debug
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.