public class MultiServer extends Object
<multiserver xmlns="http://oodt.jpl.nasa.gov/edm-commons/xml/multiserver" id="My Multi Server"> <server class="org.apache.oodt.commons.product.rmi.ProductServiceImpl" id="urn:eda:rmi:BioServer" bind="rebind" /> <server class="org.apache.oodt.commons.product.rmi.ProductServiceImpl" id="urn:eda:rmi:SpaceServer" bind="1800000" /> <server class="org.apache.oodt.commons.profile.rmi.ProfileServiceImpl" id="urn:eda:rmi:Resource" bind="bind" /> <properties> <property name="urn:eda:rmi:BioServer.handlers"> edrn.MedHandler,edrn.SpecimenHandler </property> <property name="urn:eda:rmi:SpaceServer.handlers"> pds.PlanetoidHandler </property> <property name="org.apache.oodt.commons.profile.Handlers"> com.sun.ResourceHandler </property> </properties> </multiserver>
This would start three servers (two products, one profile) with the various property
settings indicated. The MultiServer expects the property
org.apache.oodt.commons.MultiServer.config
to identify the URL of the configuration. You
can shorten that to MultiServer.config
or multiserver.config
or even just config
, in that order. If none of those properties are
specified then the MultiServer will expect the URL to be the first (and only) command
line argument.
The id
attribute on the multiserver
element tells the name
of the whole application; it's used to prefix log messages.
Each <server>
entry names a server to start. The
class
attribute is the name of the RMI-compatible Java class that the
server will run. (Note that currently only RMI servers are supported.) The
id
attribute tells the name the server should use to register with the
naming context. And the bind
attribute tells how the registration should
proceed. It can take on the following values:
true
meaning the object will attempt a bind. If the ID is already
bound in the context, the MultiServer fails.false
meaning the object won't be bound.rebind
meaning the object will rebind its ID in the context,
overwriting any previous binding.
For convenience, System Properties may be specified in the configirutaion as well.
However, any properties already defined (such as using the -D
command-line
argument) get priority and their values won't be overridden. To specify properties,
list any number of <property>
elements under the
<properties>
element with a name
attribute naming the
System Property key and the text of the element naming its value. Note that the text
will be unwrapped.
Modifier and Type | Field and Description |
---|---|
static int |
AUTO
Indicates server will try periodic rebinding.
|
static int |
BINDING
Inidcates server will try a bind.
|
static int |
NONBINDING
Indicates server won't be bound.
|
static int |
REBINDING
Indicates server will try a rebind.
|
Constructor and Description |
---|
MultiServer() |
public static final int BINDING
public static final int NONBINDING
public static final int REBINDING
public static final int AUTO
Copyright © 1999–2017 Apache OODT. All rights reserved.