possible exception category

env: INO414pl2 on sun solaris 8 64 bit
Tamino API for java
problem: what type of execption is thrown and when? any information available in any form?
example: running an update application and a query application in parallel. update application has locked a document. the query application now is tryoing toa get this document. at which point i get the execption ‘doc is locked’; as a query_execption or as an interator_exception?

Hi Michael,
TaminoAPI4J always throws a TException which you can interrogate. For example, to find the root cause of the Exception you can invoke its getRootCause() method. With the example you quote, and the following code:

catch (TException e) {
System.out.println("Root Cause of Exception: " + e.getRootCause());
}</pre><BR>you would then get:<BR><pre class="ip-ubbcode-code-pre">Root Cause of Exception: Tamino access failure (INOXYE9155, The requested docume
nt(s) could not be locked, Line x, Column y: )


The TException object is documented in the TaminoAPI4J documentation.
Hope this helps.

Hi Michael,

A list that describes which type of exception is thrown and when is not available.
Sometimes it may depend on the exact circumstances which subtype of TException is thrown.
In your example you will most probably get a TQueryException. But if you use a query with
specified quantity parameter or query for a set of non-XML documents you may get
a TIteratorException. Your application should be able to treat all possible exception types
or as Bill suggests you can catch the TException that is the base exception for the Tamino API.

Greetings,
Oliver Kleber

hi Bill, hi Oliver,
thanks for the information so far, but still the question is not answered yet. why:
assume the following:
if i get the ‘doc lock’ exception as a query exception i can try later on the query again, but what, if i get this exception during the iteration through teh result set? what type of reaction shall i execute.
another point: what if the a doc, which is part of a result set, is locked by a parallel update after the creation of the result set, but before fetching(iteration) the doc into the application?

thanks
Michael

Hi Michael,
the behaviour of Tamino in such situations depends on the settings for isolation and locking. Please have a look at the Transaction Guide in the Tamino documentation that describes concurrent database access.