back to API     back to index     prev     next  

ProActive Basic Configuration

Overview

In order to get easier and more flexible configuration in ProActive, we introduced an xml file where all ProActive related configuration is located. It represents properties that will be added to the System when an application using ProActive is launched. Some well-known properties(explained after) will determine the behaviour of ProActive services inside a global application. That file can also contain user-defined properties to be used in their application.


How does it work ?

Using this file is very straightforward, since all lines must follow the model: <prop key="somekey" value="somevalue"/>

Those properties will be set in the System using System.setProperty(key,value) if and only if this property is not already set in the System.
If an application is using ProActive, that file is loaded once when a method is called through a ProActive "entry point". By "entry point" we mean ProActive class, NodeFactory class, RuntimeFactory class (static block in all that classes).
For instance calling ProActive.newActive or NodeFactory.getNode .... loads that file. This only occurs once inside a jvm.

As said before this file can contain user-defined properties. It means that people used to run their application with:
java .... -Dprop1=value1 -Dprop2=value2 .... -Dpropn=valuen can define all their properties in the ProActive configuration file with:

<prop key="prop1" value="value1"/>
<prop key="prop2" value="value2"/>
...
<prop key="propn" value="valuen"/>

Where to access this file ?

There is a default file with default ProActive options located under ProActive/src/org/objectweb/proactive/core/config/ProActiveConfiguration.xml. This file is automatically copied with the same package structure under the classes directory when compiling source files with the ProActive/compile/build facility. Hence it is included in the jar file of the distribution under org/objectweb/proactive/core/config/ProActiveConfiguration.xml (See below for default options).

People can specify their own configuration file by running their application with proactive.configuration option, i.e
java ... -Dproactive.configuration=pathToTheConfigFile. In that case, the given xml file is loaded. Some ProActive properties(defined below) are required for applications using ProActive to work, so even if not defined in user config file, they will be loaded programatically with default values. So people can just ignore the config file if they are happy with the default configuration or create their own file if they want to change ProActive properties values or add their own properties

A specific tag is provided in Deployment Descriptor to notify remote jvms which configuration file to load once created.

ProActive properties

Example

Configuration file must have following structure:

<ProActiveUserProperties>
 <properties>
  <prop key="schema.validation"value="enable"/>
  <prop key="proactive.future.ac" value="disable"/>
  <prop key="proactive.communication.protocol" value="rmi"/>
  <prop key="proactive.rmi.port" value="2005"/>
  <prop key="proactive.locationserver" value="org.objectweb.proactive.ext.locationserver.LocationServer"/>
  <prop key="proactive.locationserver.rmi" value="//localhost/LocationServer"/>
 </properties>
</ProActiveUserProperties>

Note that ProActiveUserProperties, properties tag and the model: <prop key="somekey" value="somevalue"/> are mandatory for ProActive to parse correctly the document



Copyright © April 2004 INRIA All Rights Reserved.