1 <?xml version="1.0" encoding="UTF-8"?>
3 This is the central configuration file for the database. If the database
4 is running in a servlet-context, the configuration file will be read from
5 the WEB-INF directory of the web application. Otherwise, the configuration
6 is read from the directory specified by the exist.home system property.
8 Structure of this xml document:
30 For detailed and latest information please consult the eXist documentation:
32 - http://exist-db.org/configuration.html
33 - http://exist-db.org/cluster.html
34 - http://exist-db.org/documentation.html
35 - http://atomic.exist-db.org/
37 $Id: conf.xml.tmpl 8043 2008-07-22 05:07:24Z wolfgang_m $
40 <exist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
41 xsi:noNamespaceSchemaLocation="schema/conf.xsd">
44 Configures the cluster configuration
47 defines the user used by the cluster for the replica.
50 defines the user password used by the cluster for the replica.
53 some collections should be signed as no-replicated collections i.e.
54 during the replica phase eXist cluster environment doesn't send
55 events based on these collections, colon is the separator char when
56 more than one collection is added.
59 specifies the folder where the eXist cluster node saves its journal
60 file. Directory is automatically created if it doesn't exist. If no
61 journaldir is specified, journal is disabled.
64 defines a protocol stack. Refers the jgroups protocol stack.
66 <cluster dbaPassword="" dbaUser="admin" exclude="/db/system,/db/system/config"
67 journalDir="dataAauth/journal"
68 protocol="UDP(mcast_addr=228.1.2.3;mcast_port=45566;ip_ttl=8;ip_mcast=true;mcast_send_buf_size=800000;mcast_recv_buf_size=150000;ucast_send_buf_size=800000;ucast_recv_buf_size=150000;loopback=true):PING(timeout=2000;num_initial_members=3;up_thread=true;down_thread=true):MERGE2(min_interval=10000;max_interval=20000):FD(shun=true;up_thread=true;down_thread=true;timeout=2500;max_tries=5):VERIFY_SUSPECT(timeout=3000;num_msgs=3;up_thread=true;down_thread=true):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192;up_thread=true;down_thread=true):UNICAST(timeout=300,600,1200,2400,4800;window_size=100;min_threshold=10;down_thread=true):pbcast.STABLE(desired_avg_gossip=20000;up_thread=true;down_thread=true):FRAG(frag_size=8192;down_thread=true;up_thread=true):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=true;print_local_addr=true)"/>
71 Configures the database backend:
74 the maximum amount of memory to use for database page buffers.
75 Each database file has an associated page buffer for B+-tree and
76 data pages. However, the memory specified via cacheSize is shared
77 between all page buffers. It represents an absolute maximum, which
78 would be occupied if all page buffers were completely full.
80 The cacheSize should not be more than half of the size of the JVM
81 heap size (set by the JVM -Xmx parameter).
84 maximum amount of memory (in megabytes) to use for collection caches.
85 Memory calculation is just approximate. If your collections are very different
86 in size, it might be possible that the actual amount of memory used exceeds
87 the specified limit. You should thus be careful with this setting.
90 selects a database backend. Currently, "native" and "native_cluster"
91 are the only valid setting.
94 path to the directory where database files are stored.
97 the size of one page on the disk. This is the smallest unit
98 transferred from and to the database files. Should be a multiple of
99 the operating system's file system page size (usually 4096).
101 =====================================================================
103 The settings below are very conservative to avoid out-of-memory
104 exceptions on machines with limited memory (256MB).
106 Increase the buffer settings for elements_buffers and words_buffers if
107 you have some more memory to waste. If you deal with lots of
108 collections, you can also increase the collectionCacheSize value
110 <db-connection cacheSize="48M" collectionCache="24M" database="native"
111 files="dataAauth" pageSize="4096">
114 Specifies the default permissions for all resources and collections
115 in eXist (see User Authentication and Access Control). When this is
116 not configured, the default "mod" (similar to the Unix "chmod"
117 command) is set to 0775 in the resources and collections attributes.
119 A different default value may be set for a database instance, and
120 local overrides are also possible.
122 <!--default-permissions collection="0775" resource="0775" /-->
125 Settings for the database connection pool:
128 minimum number of connections to keep alive.
131 maximum number of connections allowed.
134 defines how often the database will flush its
135 internal buffers to disk. The sync thread will interrupt
136 normal database operation after the specified number of
137 milliseconds and write all dirty pages to disk.
139 - wait-before-shutdown:
140 defines how long the database instance will wait for running
141 operations to complete before it forces a shutdown.
143 <pool max="20" min="1" sync-period="120000" wait-before-shutdown="120000"/>
146 Configure the query pool.
148 maximum number of queries in the query-pool.
151 number of copies of the same query kept in the query-pool.
152 Value "-1" effectively disables caching. Queries cannot be shared
153 by threads, each thread needs a private copy of a query.
156 amount of time that a query will be cached in the query-pool.
158 - timeout-check-interval:
159 time between checking for timed out queries. For value "-1"
160 the time out is switched off, resulting cached queries to remain
161 in the cache forever.
163 <!--query-pool max-stack-size="5" size="128" timeout="120000"
164 timeout-check-interval="30000"/-->
167 Settings for the journaling and recovery of the database. With
168 recovery enabled, the database is able to recover from an unclean
169 database shutdown due to, for example, power failures, OS reboots,
170 and hanging processes. For this to work correctly, all database
171 operations must be logged to a journal file.
174 if this attribute is set to yes, automatic recovery is enabled.
177 this attribute sets the directory where journal files are to be
178 written. If no directory is specified, the default path is to
182 this attributes sets the maximum allowed size of the journal
183 file. Once the journal reaches this limit, a checkpoint will be
184 triggered and the journal will be cleaned. However, the database
185 waits for running transactions to return before processing this
186 checkpoint. In the event one of these transactions writes a lot
187 of data to the journal file, the file will grow until the
188 transaction has completed. Hence, the size limit is not enforced
192 this attribute determines whether or not to protect the journal
193 during operating system failures. That is, it determines whether
194 the database forces a file-sync on the journal after every
196 If this attribute is set to "yes", the journal is protected
197 against operating system failures. However, this will slow
198 performance - especially on Windows systems.
199 If set to "no", eXist will rely on the operating system to flush
200 out the journal contents to disk. In the worst case scenario,
201 in which there is a complete system failure, some committed
202 transactions might not have yet been written to the journal,
203 and so will be rolled back.
206 If set to "yes", eXist will not sync the journal file
207 immediately after every transaction commit. Instead,
208 it will wait until the current file buffer (32kb)
209 is really full. This can speed up eXist on some systems
210 where a file sync is an expensive operation (mainly windows
211 XP; not necessary on Linux). However, group-comit="yes"
212 will increase the risk of an already committed
213 operation being rolled back after a database crash.
215 <recovery enabled="yes" group-commit="no" journal-dir="dataAauth" size="100M"
216 sync-on-commit="no"/>
219 The <security> element in the <db-connection> node is used to select
220 the security manager Class and control the database of users and
224 this attribute is required, and specifies a Java class name used
225 to implement the org.exist.security.SecurityManager interface,
226 as in the following example:
228 Example: <security> class Attribute (LDAP)
229 <security class="org.exist.security.LDAPSecurityManager" />
231 eXist is distributed with the following built-in security manager
234 - org.exist.security.XMLSecurityManager
236 stores the user information in the database. This is the
237 default manager if the <security> element is not included
240 - org.exist.security.LDAPSecurityManager
242 retrieves the user and groups from the LDAP database. This
243 requires addition configuration parameters which are
244 described in the LDAP Security Manager documentation.
247 password encoding can be set to one of the following types:
250 applies plain encryption.
253 applies the MD5 algorithm to encrypt passwords.
256 applies a simplified MD5 algorithm to encrypt passwords.
259 the realm to use for basic auth or http-digest password
262 <!-- security class="org.exist.security.LDAPSecurityManager" /-->
265 This is the global configuration for the query watchdog. The
266 watchdog monitors all query processes, and can terminate any
267 long-running queries if they exceed one of the predefined limits.
268 These limits are as follows:
271 this attribute limits the size of XML fragments constructed
272 using XQuery, and thus sets the maximum amount of main memory a
273 query is allowed to use. This limit is expressed as the maximum
274 number of nodes allowed for an in-memory DOM tree. The purpose
275 of this option is to avoid memory shortages on the server in
276 cases where users are allowed to run queries that produce very
277 large output fragments.
280 this attribute sets the maximum amount of time (expressed in
281 milliseconds) that the query can take before it is killed..
284 <watchdog output-size-limit="10000" query-timeout="-1"/>
289 Settings for the indexer:
292 should equality comparisons between strings be case-sensitive or
293 insensitive: "yes" or "no".
296 defines the maximum nesting depth of nodes which will be indexed
297 in the DOM index. Nodes below the specified nesting depth will
298 not be indexed in the DOM file. This has only an effect when
299 retrieving query results or for some types of XPath subexpressions,
300 like equality comparisons.
303 eXist includes a very simple english language stemmer, based on
304 Porter's algorithm. Set the "stemming"-option to "true" if you
305 would like to use stemming. This does only work for english.
307 - suppress-whitespace:
308 should leading or trailing whitespace be removed from a text node?
309 Set to "leading", "trailing", "both" or "none".
310 Changing the parameter will only have an effect on newly loaded
313 - suppress-whitespace-mixed-content:
314 preserve the white space inside a mixed content node
317 this attribute invokes the Java class used to tokenize a string into
318 a sequence of single words or tokens, which are stored to the
319 fulltext index. Currently only the SimpleTokenizer is available.
324 <indexer caseSensitive="yes" index-depth="5" preserve-whitespace-mixed-content="yes"
325 stemming="no" suppress-whitespace="none"
326 tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes">
329 <module id="ngram-index" class="org.exist.indexing.ngram.NGramIndex" file="ngram.dbx"
332 <module id="spatial-index" class="org.exist.indexing.spatial.GMLHSQLIndex"
333 connectionTimeout="10000" flushAfter="300" />
335 <!-- The full text index is always required and should
336 not be disabled. We still have some dependencies on
337 this index in the database core. These will be removed
338 once the redesign has been completed. -->
339 <module id="ft-legacy-index" class="org.exist.fulltext.FTIndex"/>
343 The file for this element points to a file containing a list of
344 stopwords. Note that stopwords are NOT added to the fullext index.
346 <stopwords file="stopword"/>
349 Default index settings. Default settings apply if there's no
350 collection-specific configuration for a collection.
353 <fulltext attributes="true" default="all">
354 <exclude path="/auth"/>
360 Configures user jobs for the scheduler
367 The type of the job to schedule. Must be either "startup", "system" or "user".
369 startup - Startup jobs are executed once during the
370 database startup but before the database becomes available,
371 these jobs are synchronous.
373 system - System jobs require the database to be in a consistent state.
374 All database operations will be stopped until the method returns or
375 throws an exception. Any exception will be caught and a warning written to
378 user - User jobs may be scheduled at any time and may be mutually exclusive
382 If the job is written in Java then this should be the name of the
383 class that extends either -
384 org.exist.scheduler.StartupJob
385 org.exist.storage.SystemTask
386 org.exist.scheduler.UserJavaJob
389 If the job is written in XQuery (not suitable for system jobs) then this should
390 be a path to an XQuery stored in the database. e.g. /db/myCollection/myJob.xql
391 XQuery job's will be launched under the guest account initially,
392 although the running XQuery may switch permissions through
393 calls to xmldb:login().
396 To define a firing pattern for the Job using Cron style syntax
397 use this attribute otherwise for a periodic job use the period
398 attribute. Not applicable to startup jobs.
401 Can be used to define an explicit period for firing the job instead
402 of a Cron style syntax. The period should be in milliseconds.
403 Not applicable to startup jobs.
406 Can be used with a period to delay the start of a job. If unspecified jobs
407 will start as soon as the database and scheduler are initialised.
410 Can be used with a period to define for how many periods a job should be
411 executed. If unspecified jobs will repeat for every period indefinitely.
413 <!-- job class="bar.foo.myjob" period="600000" delay="300000" repeat="10" /-->
415 Run a consistency check on the database. This will detect inconsistencies
416 or corruptions in documents or the collection store. The task can also
417 be used to create automatic backups. The backup routine is faster than
418 the one in the standard backup tool and it tries to export as much data
419 as possible, even if parts of the collection tree are destroyed.
421 If errors are detected during the consistency check, the job will
422 automatically start creating a backup.
424 Errors are reported via the JMX object with the name:
426 org.exist.management.tasks:type=ConsistencyCheckTask
429 output The output directory used by the job. The path is interpreted
430 relative to the data directory (WEB-INF/data).
432 backup Set to "yes" to create a backup whenever the job runs, not just
433 when it detects errors.
436 <job type="system" name="check1"
437 class="org.exist.storage.ConsistencyCheckTask"
438 cron-trigger="0 0 * * * ?">
439 <parameter name="output" value="sanity"/>
440 <parameter name="backup" value="no"/>
443 <!-- Automatically creates a copy of the database .dbx files every 2 minutes
446 The directory into which the copy will be written
450 <job type="system" name="databackup"
451 class="org.exist.storage.DataBackup" period="120000">
452 <parameter name="output-dir" value="backup" />
454 <!-- Automatically creates a backup of the database every 6 hours.
458 The directory into which the backup will be written.
460 File suffix for the generated backup file or directory. Specify
461 .zip to write the backup into a .zip. Otherwise, the backup will
462 be written to a plain directory. The name of the final backup
463 file or directory will be: prefix + current-date + suffix.
465 File prefix for the generated backup file or directory.
469 <job type="system" name="backup"
470 class="org.exist.storage.BackupSystemTask"
471 cron-trigger="0 0 */6 * * ?">
472 <parameter name="dir" value="backup"/>
473 <parameter name="suffix" value=".zip"/>
474 <parameter name="prefix" value="backup-"/>
475 <parameter name="collection" value="/db"/>
476 <parameter name="user" value="admin"/>
477 <parameter name="password" value=""/>
478 <parameter name="zip-files-max" value="28"/>
483 Default settings for the serializer. Most of these can be changed
487 for debugging: add an exist:id attribute to every element, showing
488 the internal node identifier (as a long int) assigned to this node.
489 Possible values are: "none", "element", "all". "all" displays the
490 node of every element node; "element" displays the id only for the
491 root nodes of the returned XML fragments.
494 should the output be compressed when serializing documents?
495 Sometimes useful with remote clients.
496 Remember to add a statement like this to your client code:
497 service.setProperty("compress-output", "yes");
498 to uncompress the retrieved result in the client too.
501 should the database expand XInclude tags by default?
504 should the database evaluate XSL processing instructions
505 when serializing documents?
508 should the serializer pretty-print (indent) XML?
510 - match-tagging-attributes:
511 matches for attribute values can also be tagged using the character
512 sequence "||" to demarcate the matching text string. Since this
513 changes the content of the attribute value, the feature is disabled
516 - match-tagging-elements:
517 the database can highlight matches in the text content of a node by
518 tagging the matching text string with <exist:match>. Clearly, this
519 only works for XPath expressions using the fulltext index.
521 Set the parameter to "yes" to enable this feature.
524 <serializer add-exist-id="none" compress-output="no" enable-xinclude="yes" enable-xsl="no"
525 indent="yes" match-tagging-attributes="no" match-tagging-elements="no"/>
528 Default settings for the XSLT Transformer. Allow's for a choice of
532 the name of the class that implements javax.xml.transform.TransformerFactory
534 for Saxon (XSLT 2.0 support) - net.sf.saxon.TransformerFactoryImpl
536 You will need to copy saxon8.jar saxon8-dom.jar and saxon8-xpath.jar
538 You can get these from http://sourceforge.net/projects/saxon
540 for Xalan (XSLT 1.0 support) - org.apache.xalan.processor.TransformerFactoryImpl
543 For further details see - http://atomic.exist-db.org/wiki/HowTo/XSLT2/
545 You can also include attribute child elements, if you wish to pass in attributes
546 to your particular TransformerFactory as follows:
548 <transformer class="net.sf.saxon.TransformerFactoryImpl">
549 <attribute name="http://saxon.sf.net/feature/version-warning" value="false" type="boolean"/>
552 The example above sets Saxon to suppress warnings when executing a XSLT 1.0 stylesheet
553 with the XLST 2.0 processor. Check the documentation for your selected TransformerFactory
554 to determine which attributes can be set. Valid types include "boolean", "integer"
555 and "string". Anything else will be treated as type "string".
558 <transformer class="org.apache.xalan.processor.TransformerFactoryImpl"/>
561 Settings for XML validation
563 should XML source files be validated against a schema or DTD before
564 storing them? The setting is passed to the XML parser. The actual
565 effects depend on the parser you use. eXist comes with Xerces which
566 can validate against both: schemas and DTDs.
568 Possible values: "yes", "no", "auto". "auto" will leave validation
572 <validation mode="auto">
574 Specify the location of one or more catalog files. Catalogs are
575 used to resolve external entities in XML documents.
577 "${WEBAPP_HOME}" can be used as magic string.
581 <!-- <catalog uri="${WEBAPP_HOME}/WEB-INF/catalog.xml"/>
583 <catalog uri="catalog.xml"/>
588 Define modules that contain xQuery functions.
590 - enable-java-binding:
591 eXist supports calls to arbitrary Java methods from within
592 XQuery. Setting to "yes" might introduce a security risk.
593 - enable-query-rewriting:
594 Set to "yes" to enable the new query-rewriting optimizer. This is
595 work in progress and may lead to incorrect queries. Use at your own
597 - backwardCompatible:
598 Set to "yes" to enable backward compatibility (untyped argument checks for instance)
600 <xquery enable-java-binding="no" enable-query-rewriting="yes" backwardCompatible="no">
602 <!-- Default Modules -->
603 <module class="org.exist.xquery.functions.util.UtilModule"
604 uri="http://exist-db.org/xquery/util"/>
605 <module class="org.exist.xquery.functions.transform.TransformModule"
606 uri="http://exist-db.org/xquery/transform"/>
607 <module class="org.exist.xquery.functions.xmldb.XMLDBModule"
608 uri="http://exist-db.org/xquery/xmldb"/>
609 <module class="org.exist.xquery.functions.request.RequestModule"
610 uri="http://exist-db.org/xquery/request"/>
611 <module class="org.exist.xquery.functions.response.ResponseModule"
612 uri="http://exist-db.org/xquery/response"/>
613 <module class="org.exist.xquery.functions.session.SessionModule"
614 uri="http://exist-db.org/xquery/session"/>
615 <module class="org.exist.xquery.functions.text.TextModule"
616 uri="http://exist-db.org/xquery/text"/>
617 <module class="org.exist.xquery.modules.example.ExampleModule"
618 uri="http://exist-db.org/xquery/examples"/>
619 <module class="org.exist.xquery.functions.validation.ValidationModule"
620 uri="http://exist-db.org/xquery/validation"/>
621 <module class="org.exist.xquery.functions.system.SystemModule"
622 uri="http://exist-db.org/xquery/system"/>
624 <!-- New Modularized Indexes -->
625 <module class="org.exist.xquery.modules.ngram.NGramModule"
626 uri="http://exist-db.org/xquery/ngram"/>
628 <module class="org.exist.xquery.modules.spatial.SpatialModule"
629 uri="http://exist-db.org/xquery/spatial" />
632 <!-- Optional Modules -->
634 <module class="org.exist.xquery.modules.compression.CompressionModule"
635 uri="http://exist-db.org/xquery/compression" />
636 <module class="org.exist.xquery.modules.datetime.DateTimeModule"
637 uri="http://exist-db.org/xquery/datetime" />
638 <module class="org.exist.xquery.modules.example.ExampleModule"
639 uri="http://exist-db.org/xquery/examples" />
640 <module class="org.exist.xquery.modules.httpclient.HTTPClientModule"
641 uri="http://exist-db.org/xquery/httpclient" />
642 <module class="org.exist.xquery.modules.image.ImageModule"
643 uri="http://exist-db.org/xquery/image" />
644 <module class="org.exist.xquery.modules.mail.MailModule"
645 uri="http://exist-db.org/xquery/mail" />
646 <module class="org.exist.xquery.modules.math.MathModule"
647 uri="http://exist-db.org/xquery/math" />
648 <module class="org.exist.xquery.modules.scheduler.SchedulerModule"
649 uri="http://exist-db.org/xquery/scheduler" />
650 <module class="org.exist.xquery.modules.simpleql.SimpleQLModule"
651 uri="http://exist-db.org/xquery/simple-ql" />
652 <module class="org.exist.xquery.modules.sql.SQLModule"
653 uri="http://exist-db.org/xquery/sql" />
654 <module class="org.exist.xquery.modules.xslfo.XSLFOModule"
655 uri="http://exist-db.org/xquery/xslfo" />
656 <module class="org.exist.xquery.modules.xmldiff.XmlDiffModule"
657 uri="http://exist-db.org/xquery/xmldiff" />
663 Inserting new nodes into a document can lead to fragmentation
664 in the DOM storage file.
666 - allowed-fragmentation:
667 defines the maximum number of page splits allowed within a document
668 before a defragmentation run will be triggered.
670 - enable-consistency-checks:
671 for debugging only. If the parameter is set to "yes", a consistency
672 check will be run on every modified document after every XUpdate
673 request. It checks if the persistent DOM is complete and all
674 pointers in the structural index point to valid storage addresses
675 containing valid nodes.
678 <xupdate allowed-fragmentation="5" enable-consistency-checks="no"/>