3.4.3. Auto re-deploying

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

As described in previous sections, GroovyScript2RestLoader can be configured to deploy the scripts automatically at server startup time.

It can also be configured to detect if source code of a deployed script has changed and re-deploy it. Once again, it works on the scripts that have exo:autoload property set to "true".

Example of configuration:


<component>
    <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
    <init-params>
      <object-param>
        <name>observation.config</name>
        <object type="org.exoplatform.services.jcr.ext.script.groovy.ObservationListenerConfiguration">
          <field name="repository">
            <string>repository</string>
          </field>
          <field name="workspaces">
            <collection type="java.util.ArrayList">
              <value>
                <string>production</string>
              </value>
            </collection>
          </field>
        </object>
      </object-param>
    </init-params>
</component>

In the example above, the JCR workspace "production" will be checked for autoload scripts. At once, this workspace will listen to changes in the script's source code (jcr:data property).

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus