Skip to content

Discovery proxy configuration

JGuillemotte edited this page Mar 1, 2013 · 7 revisions

Easysoa discovery proxy configuration

The discovery proxy can be configured but at the moment, the developper have to modify several files. Here is a little article to establish a list of the concerned files.

The configuration variables are split in three files categories :

Configuration file :

  • httpDiscoveryProxy.properties : contains configuration about :
  • path where the exchange store is stored on the file system.
  • path where the templatized/customized exchanges are stored
  • path where the replay reports are stored
  • configuration to connect to Nuxeo registry service
  • Esper statements
  • Regex to determine the type of exchange (used in the monitoring service)

The configuration file is loaded by the ProxyPropertyManager at the start of the proxy (Not a SCA component). The proxyPropertyManager extends a generic PropertyManager.java

Composite files :

  • httpDiscoveryProxy.composite : contains configuration for the proxy itself and configuration for the binding rest of the runManagerDriver and the proxyManagementService.
  • proxyInfoService rest binding
  • runManagerDriverServiceComponent rest binding
  • proxy port and timeouts
  • templateEngine.composite : The component 'ProxyWSTemplate' need to be configured with the path where the Exchange record store are stored on the file system.

Classes :

  • In the ProxyFileStore.java class, the constructor call the PropertyManager. The property manager take configuration value from a configuaration file. This file must be called httpDiscoveryProxy.properties. If the configuration file is not found, the default values will be used and will be set to 'easysoa/stores/'.

Problems :

The main problem is the fragmentation of the configuration in several files and in several projects. At the moment, it is hard to find where a configuration variable is used and which component / service uses it.

There are 2 levels of configuration variables :

  • the first are variables only used by developpers to set at the build time the behavoir of a component / service (eg : esper engine statements). These variables can be inclueded in a jar.
  • the second are variables used at the run time and that can be set by the user (eg : path where the exchange store is stored). These variables need to be outside the jar or to be configuered diuring the installation of Easysoa.

In addtion, There is a problem with the PropertyManager. Other classes use it as a singleton but it is not initialized as a singleton.

Solutions :

  • Create a project dedicated to the configuration ...
  • regroup all the configuration variables in the composite(s) file(s)
Clone this wiki locally