From: Simon L. <sim...@uk...> - 2002-09-13 10:28:19
|
On Friday 13 September 2002 10:36, Jeff Martin wrote: > One problem you might come across is circular verifications. It's a > problem we had here where you can add a statement to a connection and > then the connection to the statement. When you call verify the whole > thing goes into a loop. > About 30 seconds before this arrived I was sitting here trying to work out= =20 why that exact problem had occurred! - Thanks a lot - Thats saved me=20 ages! Is that the reason a MockStatement wasn't automatically associated with=20 the Connection its added to? One of the changes I've made locally is to=20 do this (for ResultSets and their Statement as well). > The way to get around it is probably to change verify to build up a > verification set by adding it's children to it and then verifying > everything in the set. > Wouldn't it be easier for the Verifier to keep a list of objects its in=20 the process of verifying and not allow the same one twice (silently=20 doesn't bother)?=20 Making Verifier.verifyObject synchronized would stop problems with=20 multiple threads verifying at the same time (why you'd do that I don't=20 know though). > You may not hit this problem but it's possible that these sort of > changes would increase the chances of it happening. > Thanks again for the quick spot!. Cheers, Simon., =2D-=20 =2D------------------------------------------------------------------------- Simon Levitt, Senior Development Engineer @ WorldPay plc, WorldPay Centre, The Science Park, Milton Rd., Cambridge, CB4 0WE, ENGLAND = =20 Sim...@uk... Ph:+44(0)1223 715151 F:+44(0)1223 715157 =2D------------------------ http://www.worldpay.com/ ----------------------- |