src/share/classes/javax/sql/rowset/spi/package.html

Print this page




 105 that others will be accessing the data source and making modifications.  These
 106 grades set varying levels of locks to increase the chances that no conflicts
 107 occur.
 108 <P>
 109 The lowest level of synchronization is simply writing any changes made to the 
 110 <code>RowSet</code> object to its underlying data source.  The writer does
 111 nothing to check for conflicts. 
 112 If there is a conflict and the data
 113 source values are overwritten, the changes other parties have made by to the data
 114 source are lost. 
 115 <P>
 116 The <code>RIXMLProvider</code> implementation uses the lowest level 
 117 of synchronization and just writes <code>RowSet</code> changes to the data source.
 118 This is true because  typically XML data sources do not enable transaction
 119 techniques for maintaining the integrity of data. However, specific standards 
 120 groups have considered offering XML-based synchronization.  For details, see
 121 <PRE>
 122      <a href="http://www.syncml.org">http://www.syncml.org</a>
 123 </PRE>
 124 <P>
 125 For the the next level up, the
 126 writer checks to see if there are any conflicts, and if there are, 
 127 it does not write anything to the data source.  The problem with this concurrency
 128 level is that if another party has modified the corresponding data in the data source 
 129 since the <code>RowSet</code> object got its data,
 130 the changes made to the <code>RowSet</code> object are lost. The
 131 <code>RIOptimisticProvider</code> implementation uses this level of synchronization.
 132 <P>
 133 At higher levels of synchronization, referred to as pessimistic concurrency,
 134 the writer take steps to avoid conflicts by setting locks. Setting locks
 135 can vary from setting a lock on a single row to setting a lock on a table 
 136 or the entire data source. The level of synchronization is therefore a tradeoff 
 137 between the ability of users to access the data source concurrently and the  ability
 138 of the writer to keep the data in the <code>RowSet</code> object and its data source
 139 synchronized.
 140 <P>
 141 It is a requirement that all disconnected <code>RowSet</code> objects 
 142 (<code>CachedRowSet</code>, <code>FilteredRowSet</code>, <code>JoinRowSet</code>, 
 143 and <code>WebRowSet</code> objects) obtain their <code>SyncProvider</code> objects
 144 from the <code>SyncFactory</code> mechanism.  
 145 <P>




 105 that others will be accessing the data source and making modifications.  These
 106 grades set varying levels of locks to increase the chances that no conflicts
 107 occur.
 108 <P>
 109 The lowest level of synchronization is simply writing any changes made to the 
 110 <code>RowSet</code> object to its underlying data source.  The writer does
 111 nothing to check for conflicts. 
 112 If there is a conflict and the data
 113 source values are overwritten, the changes other parties have made by to the data
 114 source are lost. 
 115 <P>
 116 The <code>RIXMLProvider</code> implementation uses the lowest level 
 117 of synchronization and just writes <code>RowSet</code> changes to the data source.
 118 This is true because  typically XML data sources do not enable transaction
 119 techniques for maintaining the integrity of data. However, specific standards 
 120 groups have considered offering XML-based synchronization.  For details, see
 121 <PRE>
 122      <a href="http://www.syncml.org">http://www.syncml.org</a>
 123 </PRE>
 124 <P>
 125 For the next level up, the
 126 writer checks to see if there are any conflicts, and if there are, 
 127 it does not write anything to the data source.  The problem with this concurrency
 128 level is that if another party has modified the corresponding data in the data source 
 129 since the <code>RowSet</code> object got its data,
 130 the changes made to the <code>RowSet</code> object are lost. The
 131 <code>RIOptimisticProvider</code> implementation uses this level of synchronization.
 132 <P>
 133 At higher levels of synchronization, referred to as pessimistic concurrency,
 134 the writer take steps to avoid conflicts by setting locks. Setting locks
 135 can vary from setting a lock on a single row to setting a lock on a table 
 136 or the entire data source. The level of synchronization is therefore a tradeoff 
 137 between the ability of users to access the data source concurrently and the  ability
 138 of the writer to keep the data in the <code>RowSet</code> object and its data source
 139 synchronized.
 140 <P>
 141 It is a requirement that all disconnected <code>RowSet</code> objects 
 142 (<code>CachedRowSet</code>, <code>FilteredRowSet</code>, <code>JoinRowSet</code>, 
 143 and <code>WebRowSet</code> objects) obtain their <code>SyncProvider</code> objects
 144 from the <code>SyncFactory</code> mechanism.  
 145 <P>