openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException
Date Thu, 08 Sep 2011 14:53:58 GMT
> I was very astonished getting a
QueryCacheStoreQuery$CachingResultObjectProvider object as result.
I don't think that is quite the case.... You're getting a List
implementation back, but under the covers OpenJPA is hiding this
CachingResultObjectProvider.

> So what is going on here? I don't understand. Do I have to convert
something manually?
I spoke with Mike a little about this one, and I don't think what you are
trying to do is going to work. Setting the fetch batch size to a value
greater than zero means that OpenJPA will return you a result that will
stream results as they are requested.[1] This works fine when you are
processing a result set locally... when you try to stream this result out to
a remote client, OpenJPA doesn't have the ability to request additional data
from a remote client.

I'd recommend getting rid of the fetch batch size configuration.

Thanks,
Rick

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_lrs

On Thu, Sep 8, 2011 at 9:45 AM, M. Walter <marc.walter@sbb.ch> wrote:

> Yes the problem only occurs if I set the fetch batch size.
>
> I was very astonished getting a
> QueryCacheStoreQuery$CachingResultObjectProvider object as result. I would
> have expected an OpenJPA implementation of the List interface containing my
> entities...
>
> So what is going on here? I don't understand. Do I have to convert
> something
> manually?
>
> --
>



-- 
*Rick Curtis*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message