Skip to content

Startup Triggers

Dannes Wessels edited this page Feb 15, 2018 · 10 revisions

In conf.xml two different types of StartupTriggers can be defined to ensure a JMS listener is available after database startup.

Automatic startup: XQueryStartupTrigger

Arbitrary xquery scripts can be launched automatically from the /db/system/autostart collection. Scripts can start both messaging and replication listeners.

The template is already available in conf.xml (must be removed from comments). The XQueryStartupTrigger will create the collection /db/system/autostart with the correct permissions during the first startup. Note that for security reasons the rules regarding the permissions are quite 'strict'.

<!-- 
  XQueryStartupTrigger will execute all xquery scripts stored in the
  /db/system/autostart collection during startup of the database. 

  The collection must be owned by SYSTEM/DBA mode "rwxrwx___" (0770)
  Each of the scripts must be owned by a DBA user, group DBA, 
  mode "rwxrwx___" (0770) with mime-type "application/xquery". 
  The name of the scripts must end with ".xq", ".xqy" or ".xquery".
-->
<trigger class="org.exist.collections.triggers.XQueryStartupTrigger"/>
Clone this wiki locally