struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Struts DB Access :: Best Practices
Date Thu, 10 Mar 2005 19:03:58 GMT
On Thu, 10 Mar 2005 12:56:04 -0600, Scott Lamb <slamb@slamb.org> wrote:
> NetSQL wrote:
> > Even silly JSF uses RowSet as DTO. (RowSet is realy a ArrayList of
> > HashMaps. Rows of Columns)
> 
> What does a ArrayList of HashMaps get you over a java.sql.ResultSet?

The major disadvantage of using the RS directly is that it keeps the
connection (and associated resources - statements, etc) open the
entire time you have it. In a high load / limited resources
application, this is a big deal, and why tools like iBATIS and
Hibernate take this approach.

RAM and CPU are way cheaper than more Oracle licenses. ;-)

> I'll tell you a big disadvantage: it keeps everything in memory. What if
> the result set is large?

That is why we do the row handlers in ibatis - you get one row at a
time with very little added weight over the result set. We also
support a paginated list that only keeps a limited number of rows in
memory.

Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message