|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.regis.remote.RegistryServer
public class RegistryServer
This class is configured through Java properties. The path to a Java properties file can be specified at the command-line. This class attempts to load the file from:
If no such path is given, this class defaults to the system properties - in fact this class also defaults to the system properties if a given property could not be found at the level of the loaded properties.
This class expects one of the following properties to be specified:
If the host on which the server is started has multiple network interfaces, then the one
to specifically use can be set through the following system property
(see the Ubik documentation):
ubik.rmi.address-pattern. The value of the property must correspond to a valid regular
expression (for example: 192\.\d+\.\d+\.\d+).
The following provides a sample registry server configuration:
org.sapia.regis.factory=org.sapia.regis.local.LocalRegistryFactory org.sapia.regis.remote.jndi.name=services/regis java.naming.provider.url=ubik://192.168.0.103:1099/ ubik.jndi.domain=default org.sapia.regis.remote.p2p=true ubik.rmi.address-pattern=192\.\d+\.\d+\.\d+The properties are further explained below.
Note that if the Ubik JNDI server is used in order to publish the server on the network, the required Ubik JNDI properties must be given as part of properties loaded by this server (again, see the Ubik documentation).
Configurable interface).
However, since this can pause a security or access control issue, a registry server supports
username/password authentication. That is: as part of the server's configuration properties, a username
and password can be specified, which are used to perform authentication of remote users that
attempt loading a configuration into the registry.
The username and password must be given as values of the following properties, respectively:
org.sapia.regis.remote.bootstrap. The value of that property consists of a comma-delimited list
of resources that are to be loaded. Each resource is interpreted either as (whichever works first):
org.sapia.regis.remote.bootstrap=/home/conf/host.xml, http://mercury.acmeco.net/global.xmlAttempt is made to load all resources (loading does not stop at the first resource that is found).
Replication is not performed in the case of boostrap configuration.
The domain of a registry server is passed to it through the properties that it loads. It
is identified by the following property: ubik.jndi.domain (the server uses
Ubik's multicast to discover other registry servers in the domain, and publish itself to these
peers). If the property is not specified, default is used as domain name.
In addition, for the replicated mechanism to work, the following property also has to be
specified: org.sapia.regis.remote.p2p, with a value of true.
The RegistryTask Ant task has been implemented in order to
upload registry configuration remotely, from an Ant script.
| Nested Class Summary | |
|---|---|
static class |
RegistryServer.ShutdownHook
|
| Field Summary | |
|---|---|
static boolean |
startThread
|
| Fields inherited from interface org.sapia.regis.remote.RemoteConsts |
|---|
BOOTSTRAP, DEBUG, DEFAULT_PASSWORD, DEFAULT_USERNAME, PASSWORD, PEER_TO_PEER, SERVER_JNDI_NAME, SERVER_PORT, USERNAME |
| Constructor Summary | |
|---|---|
RegistryServer()
|
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean startThread
| Constructor Detail |
|---|
public RegistryServer()
| Method Detail |
|---|
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||