struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Zakarian" <jzakar...@welchpartners.com>
Subject RE: RowSetDynaClass
Date Tue, 18 Feb 2003 12:42:38 GMT
Hi Vic,

Item 6 talks about CachedRowSets. I read the article and visited Sun's
website. Its states that you can not use the binary's in commercial
products.
It also says that the data set is sent to the client. 

I have two questions
1. Is there an alternative to the CachedRowSet that can be used in
commercial products? If not what do you use?

2. Does using CachedRowSets cause a lot of network traffic if the size
of the set is big?

Thanks,

Jack

-----Original Message-----
From: Vic Cekvenich [mailto:vc@basebeans.com] 
Sent: Tuesday, February 18, 2003 6:25 AM
To: struts-user@jakarta.apache.org
Subject: Re: RowSetDynaClass

(my post got lost) bellow:

Luiz-Otavio Zorzella wrote:
> Craig R. McClanahan wrote:
>>
>> Sundar Narasimhan wrote:
>>
>>> I agree that this approach works well for "small" result
>>> sets. However, if there are say 10k rows.. it would be nice to have
>>> such a class work together with a Pager tag set.. any thoughts re.
that?
>>
>>
>> Sounds like a good problem that needs to be solved in a general way.
>> Best way to get it addressed might be to put in an enhancement
request
>> against BeanUtils to add row index limits on the rows that are 
>> returned by
>> the list.
>>
>>   http://nagoya.apache.org/bugzilla/
> 
> 
> I have another idea for dealing with paging, in the lines of 
> ResultSetDynaClass... From an earlier email:
> 
> ********************
> 
> I want, like in the a ResultSetDynaClass, a structure that does not
copy 
> the elements, from which I can get an Iterator. Now, once I
"getNext()" 
> from the Iterator, I want to get a copy of the object, so that I can 
> later use it, even after exhauting the ResultSet. This is a "kind of"
a 
> lazy loading. BTW, the "advance ()" method is what I would use if I
want 
> to advance, but not have the copy generated...
> 
> Maybe I could create a constructor for 
> ResultSetDynaClass/ResultSetIterator that receives a boolean that 
> specifies if I want copies of elements rather than references...
> 
> *********************
> 
> Zorzella


1. Closing the RowSet is the traditioanl aproach, even in ODBC, 
Client-Server or even in C API Client Side DB, very few drivers support 
streaming rows.

2. Most apps have hundreds of users, not many need thousands of 
concurent users per CPU; but with above aproach several thosuand per CPU

on app. server works fine with sub second response time at least for my 
clients.

3. If you do go down the road (and best to pick up this thread in 
Commons as mentioned) than 
http://gee.cs.oswego.edu/dl/classes/collections/ are nice threaded 
collections (part of JDK1.5 now). But be very carefull when creating own

threads on the app. server.

4. 
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-sele
ct.html
one way is to pass the offset above to the RowSet via getParameter. This

works with large resultsets.

5. Consider using RowSetDynaClass instead of ResultSetDynaClass...... 
acctualy I allways use RowSet* never ResulstSet*. Copying is optional 
with RowSet.
Here are drivers that do RowSet (click rowset)
http://industry.java.sun.com/products/jdbc/drivers


6. This sounds more of something Hibreanate should do and not Struts.
And everyone knows my fave aproach is:
http://developer.java.sun.com/developer/technicalArticles/javaserverpage
s/cachedrowset 

Simple and fast (combined with offset on Select)

hth

.V



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




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


Mime
View raw message