assertSame(ustmt1, ustmt2) passes the test for me which confirms that the two statements refer to the same object but your example code shows a failure output.
Also the test fails for createStatement() but this may because it's an empty connection with nothing to key off of. Statement s1 = conn.createStatement(); ResultSet rs = s1.executeQuery("SELECT * FROM PET"); //PreparedStatement s1 = conn.prepareStatement("SELECT * FROM PET"); //ResultSet rs = s1.executeQuery(); TestAll.printResults(rs); Statement us1 = ((DelegatingStatement) s1).getInnermostDelegate(); s1.close(); Statement s2 = conn.createStatement(); rs = s2.executeQuery("SELECT * FROM PET"); //PreparedStatement s2 = conn.prepareStatement("SELECT * FROM PET"); //rs = s2.executeQuery(); TestAll.printResults(rs); Statement us2 = ((DelegatingStatement) s2).getInnermostDelegate(); s2.close(); assertSame(us1, us2); -- The information contained in this email along with all attachments is confidential and is not to be shared without my permission and prior knowledge of who will be viewing it's contents including all attachments. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]