You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "McCaffrey, John G." <Jo...@kraft.com> on 2004/03/03 18:54:27 UTC

QueryBySQL problems

I would like to use QueryBySQL in situations where I have complicated,
multi-join SQL.
I have gotten it to work, using a complicated query, but when I call that
same query again, I have a problem. A big problem. (no exception is thrown,
but my entire websphere server shuts down.)

In diagnosing this issue, I have determined that ANY time I use QueryBySQL
with the same query TWICE, it will fail on the second attempt.
Example 1:
run QueryBySQL A
run QueryBySQL A (fail)

Example 2:
run QueryBySQL A
run Query B (normal OJB QueryByCriteria)
run Query C (normal OJB QueryByCriteria)
run QueryBySQL A (fail)

Example 3:
run QueryBySQL A
run QueryBySQL B
run QueryBySQL C
run QueryBySQL A (fail)

I am going to turn on the DB2 Trace, to see what is happening, but I was
wondering if anyone knows about this issue, or has any suggestions for how I
might solve it.


//This is a simple example, when this is called twice in a row, it will fail
String testQuery = "Select current timestamp as MAINT_TS from
sysibm.sysdummy1";
QueryBySQL query= QueryFactory.newQuery(AnyVO.class,testQuery );
retCol =  persistanceBroker.getCollectionByQuery(query);

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org