Re: Auditor and OSGi

2011-09-08 Thread Bengt Rodehav
Hello again, I'm not familiar with the class resolver plugin but I did the following: - I created a resolver (code is at the end of the mail) - I configured my persistence.xml to use that resolver (persistence.xml at the end of the mail) The above does not throw any exceptions on startup. On

Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException

2011-09-08 Thread M. Walter
In my code I would like to set the fetch batch size in order to speed up loading entities: final OpenJPAQuery ojpaQuery = OpenJPAPersistence.cast(em.createNamedQuery(myNiceQuery)); ojpaQuery.getFetchPlan().setFetchBatchSize(2000); final List result = ojpaQuery.getResultList(); The result list

Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException

2011-09-08 Thread Rick Curtis
Does this problem only occur when you set the fetch batch size? I tried recreating this problem on trunk with a simple unit test where I serialized a result that came from a cached query and I am unable to see the same behavior. If I get some time this am I'll give it a shot on 1.2.x. Thanks,

Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException

2011-09-08 Thread M. Walter
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

Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException

2011-09-08 Thread Rick Curtis
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

Re: Using FetchPlan.setFetchBatchSize() feature leads to java.io.NotSerializableException

2011-09-08 Thread M. Walter
Okay thanks. What I was trying to do was setting the fetch size like in java.sql.ResultSet so rows aren't read one row at a time but many rows at a time instead. We experienced a higher performance executing a query with JDBC and using the fetch size feature. Without fetch size the JDBC query was