To answer my own question, it looks like the proxy classes are instanciated only when they need to be (i.e. every ResultSet in the system isn't necessarily a ResultSetLogProxy class). When things are going to and coming back from the database the respective proxy version of the class is used.
--- Ron Grabowski <[EMAIL PROTECTED]> wrote: > I know what code proxies are but I'm not an expert on them. I was > looking through the com.ibatis.common.jdbc.logging package and came > across BaseLogProxy and all the classes that extend it: > StatementLogProxy, ResultSetLogProxy, etc. How/when are those > classes' > invoke methods called? I don't see other classes creating instances > of > ResultSetLogProxy. Other parts of Ibatis (SqlExecutor's executeQuery > for example) instanciate normal ResultSet objects. Do all ResultSet > instances automagically pass through the ResultSetLogProxy? If so, > how > is that wired up? > > Also, when I was looking at code inside of ResultSetProxy: > > } else if ("next".equals(method.getName())) { > String s = getValueString(); > if (!"[]".equals(s)) { > if (first) { > first = false; > if (log.isDebugEnabled()) { > log.debug("{rset-" + id + "} Header: " + > getColumnString()); > } > } > > It looks like even if all logging is turned off, getValueString() is > still being called. It seems like a single call to isDebugEnabled() > would be more effencient than generating a potentially large string > that may or may get used: > > } else if ("next".equals(method.getName())) { > if (log.isDebugEnabled()) { > String s = getValueString(); > > Thanks, > Ron >