Hi Patrick
Thank you very much. At first I thought ... this can't be possible but then I
suspected it had something to do with the hotspot engine. It always helps if
someone else has experienced the same behavior, otherwise you really start
questioning your sanity :-)
Thanks,
Eduard
Patric Bechtel wrote:
> On Mon, 28 Jan 2002 09:40:23 +0100, Eduard Mossinkoff wrote:
>
> Hello Eduard,
>
> I've a similar problem; I first thought I'm crazy, too :-) so don't mind.
> The cause I found is the method finalize in OQLQuery. I think the
> rather agressive gc of the hotspot engine calls the finalizer and that
> one closes the ResultSet. I've made a patch (just commented the function)
> which runs fine for me the last 6 weeks. But I'm not sure if it destroys
> anything. I think as far as you properly close each Result, there's no
> prob. But if not, there's a leak (I think that was the idea behind the
> finalize routine).
> Another workaround could be to give the query to the subroutine, too;
> in that case, the finalizer of OQLQuery isn't called as soon as the
> function ends.
>
> hope that helps...
>
> >Hello
> >
> >I'm experiencing some unexplainable behavior of a QueryResults instance.
> >I've made some junit tests to be sure that the problem can be
> >reproduced.
> >
> >If I perform a query and iterate over the resultset, things work as one
> >should expect.
> >I begin the transaction create an OQL statement, execute the query,
> >iterate over the resultset and commits the transaction.
> >Everything works fine.
> >
> >Now if I move the iteration from the body of the same method into
> >another method. Then the resultset only gives me 1 iteration whilst
> >there are more elements obtained from in the query. I begin the
> >transaction, call the method that does the querying, receive an open
> >resultset of type QueryResults, start iterating, commits the transaction
> >and closes the QueryResults. If I do this I only obtain one element
> >although if I perform the same query as in the above stated scenario,
> >the only difference is that the iteration is performed within the body
> >of another method.
> >
> >So only by returning a reference to a QueryResults around to makes it
> >"forget". I know this sounds almost impossible but there is definitely
> >something wrong. I single stepped with the aid of a debugger but
> >couldn't find anything wrong.
> >
> >I'm using the win32 jdk 1.3.1-b24 in mixed mode with hotspot enabled and
> >the Eclipse R1.0 IDE
> >
> >The oql query by the way is:
> >"SELECT a.reciprocal.type FROM org.moss.meta.assoc.AssociationEndImpl as
> >a WHERE a.type=$1 AND a.association=$2"
> >
> >Where AssociationImpl class has a reference of the same type called
> >"reciprocal", a reference to TypeImpl called "type" and a reference to
> >AssociationImpl called "association". This query works OK and the
> >generated SQL is correct.
> >
> >Hope someone can verify a similar problem.
> >Thanx in advance.
> >Eduard.
> >
>
> sincerely,
>
> Patric Bechtel
> IPCON Informationssysteme
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev