[Mulgara-dev] TransactionalAnswer not closed

Life is hard, and then you die ronald at innovation.ch
Fri Feb 2 00:27:48 UTC 2007


[Btw., we're a different project than David, but it looks like we
might have the same problem, so I'm going to jump in here].

On Thu, Feb 01, 2007 at 11:52:31PM +0100, Paul Gearon wrote:
> Actually, I don't know how to talk to Mulgara with SOAP (I also thought that
> Simon said that the SOAP interface isn't working 100% at the moment?).
> Could you send me a code snippet so I can see how it is done?  I may be able
> to spot something.

It just exposes the ItqlInterpreterBean.executeQueryToString() as a
soap service. I.e. all it does call executeQueryToString().

[snip]
> >Did you know that you have to close the sub-answers as well as the parent
> >answer?

Interesting. Ok, I took another look at ItqlInterpreterBean, and lo
and behold I found this in appendSolution():

          Element variable =
              (Element) solution.appendChild(doc.createElementNS(TQL_NS,
              answer.getVariables()[column].getName()));

          if (object instanceof Answer) {

            Answer tmpAnswer = null;
            try {

              tmpAnswer = (Answer) object;
              appendSolution(tmpAnswer, variable);
            }
            finally {

              if (tmpAnswer == null) {

                tmpAnswer.close();
              }
            }

Looks like that last test is wrong, and hence the subquery answers are
not being closed.

We definitely make use of subqueries too. So I'll run some tests later
to see if this is the cause of our weirdness.


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list