[ http://issues.apache.org/jira/browse/IBATIS-226?page=comments#action_12358098 ]
Paul Benedict commented on IBATIS-226: -------------------------------------- Jeff and Larry, thank you for your kind replies. First, remember that Java is completely dynamically linked. Just because you include support for DBUtils, does not mean you then have to include that jar in your distribution -- it's ONLY if you actually end up using that file. Spring is totally packaged this way; if you don't use a certain aspect, you also don't need the supporting libraries because they are never invoked. DBUtils is such a small library; I understand the concern BUT have you seen the class? It is LITERALLY this: public interface ResultSetHandler { public Object handle(ResultSet rs); } http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java?rev=155411&view=markup However, if you're looking to completely avoid dependency on another library, you can easily include this class in the distribution yourself. For instance, in the Commons BeanUtils package they actually import a few classes from Commons Lang to prevent the dependency on the entire library. This is a very smart option. Likewise, linking in this ONE file gives a great benefit to all IBATIS. As for Jeff's comment: I use Hibernate all day at work and I probably would not use it otherwise. It's a great product, but personally I have pre-written queries in XML files and IBATIS is a natural migration path for me. I have large SQL statements that would be a real burden (or impossible) to turn into HQL. Besides, replacing my ? with the #var# and using <sql> replacements, IBATIS gives me so much benefit that I didn't have before. I love IBATIS but I am also stretching it to the max.... I take my problems to the OS community because my problems are opportunties for product improvements. I really find this feature valuable and a PLUS for IBATIS, but please give me a hard thought on this issue. Let me submit a patch and you guys can then debate the merit of it looking at the code. It might be as good as I say and not as terrible as you think. > Support Commons DBUtils ResultSetHandler > ---------------------------------------- > > Key: IBATIS-226 > URL: http://issues.apache.org/jira/browse/IBATIS-226 > Project: iBatis for Java > Type: New Feature > Components: SQL Maps > Reporter: Paul Benedict > > Sometimes I need total control over the caching mechanism for very critical > systems. I need to also guarantee object identity and I can only do this when > handling the result set myself. I propose adding an attribute to the > <statement> tag (and also <select>, <insert>, <update>) that will specify a > subclass of ResultSetHandler so that I may write custom code and decode the > ResultSet myself. The ResultSetHandler class is part of the Jakarta Commons > DBUtils package. It is extremely useful! > <select id="findMyObject" resultSetHandler="com.company.MyResultSetHandler"> > To prevent excess object creation, IBATIS must reuse the same instance it > creates. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira