Re: why not return resultset
Wednesday, December 4, 2002 02:22 AM
The problem is that ResultSet keeps a connection to the database. Therefore you can't return it to the client.
However you can return an object that can be used in the same way as a ResultSet but is disconnected. See the pattern "Data Transfer Rowset" in Floyd Marinescu's book EJB Design patterns (there is a free PDF version available at http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp).