Is CachedRowSet performant?

I read here:
http://developer.java.sun.com/developer/Books/JDBCTutorial/chapter5.html

"A CachedRowSet class-a disconnected rowset that caches its data in memory;
not suitable for very large data sets, but an ideal way to provide thin Java
clients, such as a Personal Digital Assistant (PDA) or Network Computer
(NC), with tabular data "

Is this information in the tutorial out of date?

Thanks,

Dean Chen


-----Original Message-----
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 11:10 AM
To: [EMAIL PROTECTED]
Subject: Re: CachedRowSet vs Collection of ValueObject


Subject: Re: CachedRowSet vs Collection of ValueObject
From: Vic C <[EMAIL PROTECTED]>
 ===
When people use a the old ResultSet API (instead of the newer RowSet 
API) they need a collection to store rows.

You can avoid creating collecion and the garbage collection and the meta 
data about the collection by using the RowSet's CachedRowSet.

(Also RowSet can be created using new() and not ResultSet, making it 
less likely to leak memory. )

A CachedRowSet is a list of rows.
Why is it so cool and why is it called Cached?
Becuase it is DISCONNECTED.
So after you retrieve, you can disconnect and still access the row. You 
do not need to create a collection.

The reason people used to need a collection is becuase they used to use 
ResultSet which is not a JavaBean and ... it needed to be connected.

Vic


vivek shrivastava wrote:
> Hi,
> 
> Following question may sound stupid but this is something I just thought 
> of it.
> 
> Can we use a helper class (Let's say HelperDB) which has "CachedRowSet" 
> as a private member of that helper class instead of using a collection 
> of ValueObject?
> 
> I am thinking of using this helper class in EmpForm object of my little 
> application. In EmpAction class i can get a instance of helper class 
> from EmpForm or i can build a instance of helper class in EmpAction 
> class and set it to EmpForm class.
> 
> i am also thinking of implementing Iterator interface in helper class so 
> that i can use this class in <logic:iterate> tag. Like:
> 
> <logic:iterate id="emp" property="HelperDB" name="EmpForm">
> 
> This way i don't have to create a collection of EmpVO (almost duplicate 
> of Empform).
> 
> is it a good idea or bad?
> 
> Please do comment.
> 
> Thanks
> vivek
> 
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to