On Jan 6, 2011, at 10:48 AM, Hans Pikkemaat wrote: > One library calls the other one. > The first one is using the iterated query to get some data. It will call the > second > library to process the data.
IMO this first library (iterator control code) should be the place that does transaction switching, transparently to the second library. E.g. in lib1: try { while(it.hasNext()) { Map nextRow = it.next(); // save current tx in a local ivar try { // set current tx to NULL // call lib2 } finally { // restore tx } } } finally { it.close(); } > > Now you could say that this is a design flaw. IMO it is. Andrus