gstackoverflow
gstackoverflow

Reputation: 37034

When should I use connected RowSet and when - disconnected?

I have read this intersting article about rowset

http://javarevisited.blogspot.ru/2014/04/Connected-vs-disconnected-rowsetprovider-rowsetfactory-and-rowset-JDBC-Java.html

I realized that we have 2 types of RowSet:

  1. connected (JdbcRowset)
  2. disconnected (JoinRowSet, CachedRowSet, FilteredRowSet and WebRowSet)

I understand difference between these RowSet types but I have misunderstanding about aims of creation two types of RowSet. It relates with performance issues?

And after first question answer I want to know why only JdbcRowset is connected and rest Rowset inheritors are disconnected.

Upvotes: 0

Views: 192

Answers (1)

Marko Mihajlovic
Marko Mihajlovic

Reputation: 9

From your source:
1) Disconnected database connected to the database only when they want to read or write, a(...) on the other hand, Connected database keep JDBC connection alive all time.

So why would we waste resources => performance issue.

Upvotes: 1

Related Questions