Hi all,
in my trigger (on insert, update and delete events) I perform an update (via xquery) of existing documents in the same collection and of the same doctype of the current document. But an error message was returned:
Database access failure (7126, INOSXE7126, Server extension failed, INOSXE7023: Function ‘Ead.InsertDoc’ failed, because XML callback failed with error ‘8504’)
where:
INOXME8504 XML maximum request duration exceeded
but it is really a maximum request duration exceeded problem? I suppose it’s a lock problem.
Every help and suggestion is appreciated.
Thanks in advance,
Hi Mark,
you are right: according to the XML request logging it is a transaction timeout. But why?
For example, the insert event get the tamino id of the current document and only perform an xquery like this:
If I perform it with Tamino Interactive Interface, the update is executed.
I am not a Tamino expert, could you help me to understand?
Thanks in advance!
Hi Mark,
the xquery runs on the same collection/doctype as the trigger, as I wrote (no clearly!) in my first email.
It may be a locking conflict within the trigger! What can I do to resolve it?
Thanks in advance for your precious help,
From your code I see that you try to query using the Tamino Java API. This opens a new session in parallel to the existing session in which the trigger function is called. So this explains the locking.
You should rather use X-Tension callbacks (see Tamino documentation on X-Tension: Tamino Server Extensions → Developing Tamino Server Extensions → Callbacks). The function to use is
int SxsXMLXQuery (String collection, String query, Result result);
This XQuery is called inside the same session and will thus (hopefully) not produce any locking problems.