Database Reference
In-Depth Information
Once the versioning filter is enabled, if you request a versioned document from the
database you will see three additional attributes on its root element: v:revision ,
v:key , and v:path . For example:
<actor xmlns:v= "http://exist-db.org/versioning" v:revision= "2"
v:key= "144a903cec62" v:path= "/db/actors/michael-rennie.xml" >
<name>
<given> Michael </given>
<family> Rennie </family>
</name>
<born> 1909 </born>
<deceased> 1971 </deceased>
<abstract> The British actor Michael Rennie worked as a car salesman
and factory manager before he turned to acting. A meeting with a
Gaumont-British Studios casting director led to Rennie's first acting
job - that of stand-in for Robert Young in Secret Agent (1936),
directed by Alfred Hitchcock. </abstract>
</actor>
While adding the versioning attributes to the root element of the document is not
ideal, it is really the only way that eXist can attempt to ensure that this information is
preserved during a round-trip of the document out of the database, into a client edi‐
tor, and back out again. The versioning attributes, however, are in their own name‐
space and so hopefully will not interfere with your document.
If you are making use of the versioning filter, you must not remove
the versioning attributes from the document if you plan to store it
back into eXist in the same location, or you risk losing previous
changes from the revision history!
Scheduled Jobs
eXist has a scheduler built into its core that enables you to schedule jobs to be exe‐
cuted at some point(s) in the future. Internally eXist wraps the Quartz scheduler , but
it exposes a much simpler interface to the user and allows jobs to interact with the
database. You can write your jobs in either XQuery or Java. XQuery jobs are simpler
to implement ,while Java jobs give you more control over how the job is executed.
There are two types of job that can be executed by the scheduler:
User jobs
This is the standard job type that users will typically implement in either XQuery
or Java. User jobs may execute concurrently, and the same job may overlap with
a previously scheduled execution if it is long-running.
System task jobs
System task jobs are solely for executing system tasks and may only be imple‐
mented in Java. System tasks execute when the database is switched into pro‐
Search WWH ::




Custom Search