the resultset is close when the statement is closed, which is close when the 
connection is closed.  Here is the code that we use to close the resultsets:

  |   /**
  |     * free up resources opened from this statement.
  |     */
  |    public void close() {
  |       if ( resources.size() == 0 ){
  |          log.debug("nothing to close for this statement. " + toString());
  |       }
  |       
  |       for (Iterator i = resources.iterator(); i.hasNext(); ) {
  |          Object obj = i.next();
  |          // since the list of resources is not typesafe make sure
  |          // the object returned is a resource that can be closed.
  |          if (obj != null && obj instanceof ResultSet) {
  |             try {
  |                log.debug("closing resoruce " + obj.toString());
  |                ((ResultSet)obj).close();
  |                i.remove();// be extra clear, not really neccessary but robust.
  |             }
  |             catch (SQLException e) {
  |                log.warn("Failed to close ResultSet " + e.getMessage(), e);
  |             }
  |          }
  |          else if ( obj != null ){
  |             log.warn("Could not close resultset, not an instance of ResultSet: " + 
obj.getClass().getName());
  |          }
  |       }
  |    }
  | 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3842294#3842294

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3842294


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to