Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is jdbc RowSet cool?

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see the whole RowSet* class suite, but I'm missing something. Other than the disconnected modes, which don't seem to be useful in the domains where I work, I don't see what this gains over using normal JDBC will connection pooling.

What am I missing?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4032
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A RowSet is only useful if you want to disconnect a ResultSet from a data source, serialize/deserialize the object, and transmit it over the network. It could also be extremely expensive to use. Let's say you run a search engine query that has millions of matching records. A ResultSet is only going to return a certain number of records at a time while a RowSet is going to return all of them since it must finish its connection to the database at the time its created/executed.

In general, unless you're connecting between tiers and need a lot of serialized data, RowSets aren't particularly useful. Even in cases where you do need the data serialized, its *far* more common to define your own POJO transfer object and move the data in there since it often needs to be formatted for transport anyway.
[ August 24, 2008: Message edited by: Scott Selikoff ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic