On Mon, 08 Mar 2010 05:40:57 -0800, SinghDang, Balvinder (ELS-OXF) <[email protected]> wrote:

Hi All,
We are currently developing an application for storing XML Content in ML
database, and noticed couple of issues
Task Persistence Issue: Tasks queued in the Task Server do not seem to
survive a server restart. This behaviour is in contrast to JMS servers
that usually provide multiple persistence options (file journal,
database etc).
Graceful Shutdown Issue: During a server shutdown, tasks being executed
by Task Server at that point (in the 4 threads) "may" not complete
execution. We checked this using a Task that takes 10sec (we used the
sleep API) to execute. ML server shuts down in about 4 secs. We noticed
that the entry into the task was logged, but the exit from the task was
not logged - suggesting that the task started execution but did not
complete it.
Just wanted to check, if there is a recommended workaround from
MarkLogic to achieve message persistence? Any workaround that any of you
would have used in any of the projects.
Any help is greatly appreciated.
Thanks,
Balvinder Dang


Correct, tasks on the task server are not persistent, nor are they guaranteed
to complete before a shutdown.

CPF layers on top of triggers and provides for persistence of the work queues on documents. Depending on how you are using the task server, you could rework your application to use CPF instead, or you could use similar techniques, although
you'd be well advised to avoid reinventing the wheel.

CPF uses properties on the documents being processed to keep track of
what work is in progress and how far it has advanced.  A database online
trigger uses these properties to respawn work that was not completed when
the server shut down.

//Mary


_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to