Service Registry (Registrar) Configuration File Settings
The file localhost-registrar-config.xml contains a basic setup for a
Service Registry to run on the local machine and will provide a good example for how
to structure and populate customized Service
Registry config files. See the mobius configuration overview for
information on the elements in the top resource block
of this configuration file.
The Service Registry contains a single resource block that provides certain functionality and information to other Service Registry components. The resources defined in the block are instantiated by the Service Registry at startup and are configured by the config file. The resource for the Service Registry is:
- Registrar Configuration
<resource name="registrarConfig"... >
The element <registrar-configuration>, the outermost element of
the resource, has an "id" attribute, the value of which
should be set to the name for your instance of the Service Registry.
You should not run multiple Service Registries with the same names on the
same host—each registry should have a unique name.
The element contains two sub-elements. Each is listed here,
along with its children. Below this list we have elaborated the purpose
of the elements.
databasenamedriverurlPrefixhostportusernamepasswordpool
pingInterval
<database>-
This element configures the MySQL database information.
The children of this element configure the database:
<name>- This element specifies the name of the database. For MySQL's root database, this should be nothing.
<driver>- The driver class for accessing the MySQL database.
<urlPrefix>- The url prefix for accessing the database.
<host>- The host the database lives on. Usually, this will be localhost.
<port>- The port via which the database can be accessed.
<username>- The username to log into the database with. This username must have privileges to create and delete databases and tables.
<password>- The password to authenticate the username.
<pool>- This element determines how many connections to the database will be made initially. When the Service Registry needs to communicate with the database, it will get a connection, and when its done, it releases it. Should the Database Manager run out of available connections, it will make a new one, but this causes a slight delay. Set the pool value in anticipation of how many concurrent database operations will be needed.
<pingInterval>- This element has one attribute, "milliseconds", which takes an integer value that determines how often the Service Registry should ping its registered services. The Service Registry will automatically drop any service registered with it that fails to respond to the ping.