Thanks Andrus.
Mark
> On 17 Oct 2016, at 06:28, Andrus Adamchik wrote:
>
> Hi Mark,
>
> Scenario B is now the default after a recent change per [1]. We decoupled the
> transaction handling open iterator (and all its connections) from any
> transactions started by context commits within the i
Hi Mark,
Scenario B is now the default after a recent change per [1]. We decoupled the
transaction handling open iterator (and all its connections) from any
transactions started by context commits within the iterator. Here is a related
mailing list thread [2].
Andrus
[1] https://issues.apache
Thanks John. Interestingly, I did some testing and peer contexts aren’t
committed until the batch iterator JDBC ResultSet is closed at the end of
iteration either. This is fine but for a long running task, I thought that
there was a problem (but there wasn’t). I think the only workarounds are a)
I would use a peer context.
You can create a peer context like this if you runtime has been bound to
the current thread using
CayenneRuntime.bindThreadInjector(runtime.getInjector())
public static ObjectContext newObjectContext() {
ObjectContextFactory factory = CayenneRuntime.getThreadInjector
(
Sorry… meant to say using Cayenne M4.0.M3…
Mark
> On 15 Oct 2016, at 20:29, Mark Wardle wrote:
>
> I’m using ResultBatchIterator like this:
>
> Consumer forEach = ...
> try (ResultBatchIterator iterator = query.batchIterator(context,
> batchSize)) {
> for(List batch : it