Configuration

Component Configuration

ItemDatatypeCardinalityDescription
scriptEnginesComplex[1] The list of available script engines
scriptEngines\scriptEngineComplex[1..n] Metadata about a particular script engine
scriptEngines\scriptEngine\nameString[1] The name of the script engine to lookup the implementation using the ScriptEngineManager.getEngineByName()
scriptEngines\scriptEngine\isCachedboolean[0|1] Is the script cached or reloaded from the resource service each time? This setting is useful for debugging when you edit the script on the fly since the changes take place immediatly.
scriptEngines\scriptEngine\isCompiledboolean[0|1] Is the script compiled to an internal representation before being executed. Using a compiled script improves the performance together with cached scripts (see above)
scriptEngines\scriptEngine\locationString[0|1] The location of the scripts regarding the resource service. If no value is supplied than <name> is used.
scriptEngines\scriptEngine\preLoadComplex[0|1] A list of scripts to preload during startup.
scriptEngines\scriptEngine\preLoad\scriptString[0..n] A script to preload during startup.
scriptConfigurationComplex[0|1] Contains the user-defined configuration to pass to the executed script using the AvalonScriptContext.

Component Configuration Example

          
<ResourceManagerService>
  <domain name="js">
    <suffix>js</suffix>
    <location>./src/test/scripts/js</location>
    <useLocator>true</useLocator>
  </domain>
</ResourceManagerService>

<ScriptService>
  <scriptEngines>
    <scriptEngine>
      <name>js</name>
      <isCached>true</isCached>
      <isCompiled>true</isCompiled>
      <location>js</location>
      <preLoad>
        <script>InvocableIntf.js</script>
      </preLoad>
    </scriptEngine>
  </scriptEngines>
  <scriptConfiguration>
    <isDebug>true</isDebug>
  </scriptConfiguration>
</ScriptService>
          
        

Role Configuration Example

          
<role
    name="org.apache.fulcrum.resourcemanager.ResourceManagerService"
    default-class="org.apache.fulcrum.resourcemanager.impl.ResourceManagerServiceImpl"
    shorthand="ResourceManagerService"
    early-init="true"
    description="Handles the management of resources"
 />
<role
    name="org.apache.fulcrum.script.ScriptService"
    default-class="org.apache.fulcrum.script.impl.ScriptServiceImpl"
    shorthand="ScriptService"
    early-init="true"
    description="Handles the execution of scripts"
 />