183 * If a <code>RowSet</code> object attempts to obtain a <code>MyProvider</code>
184 * object, the <code>SyncFactory</code> will try to locate it. First it searches
185 * for it in the system properties, then it looks in the resource files, and
186 * finally it checks the JNDI context that has been set. The <code>SyncFactory</code>
187 * instance verifies that the requested provider is a valid extension of the
188 * <code>SyncProvider</code> abstract class and then gives it to the
189 * <code>RowSet</code> object. In the following code fragment, a new
190 * <code>CachedRowSet</code> object is created and initialized with
191 * <i>env</i>, which contains the binding to <code>MyProvider</code>.
192 * <PRE>
193 * Hashtable env = new Hashtable();
194 * env.put(SyncFactory.ROWSET_SYNC_PROVIDER, "com.fred.providers.MyProvider");
195 * CachedRowSet crs = new com.sun.rowset.CachedRowSetImpl(env);
196 * </PRE>
197 * Further details on these mechanisms are available in the
198 * <code>javax.sql.rowset.spi</code> package specification.
199 *
200 * @author Jonathan Bruce
201 * @see javax.sql.rowset.spi.SyncProvider
202 * @see javax.sql.rowset.spi.SyncFactoryException
203 */
204 public class SyncFactory {
205
206 /**
207 * Creates a new <code>SyncFactory</code> object, which is the singleton
208 * instance.
209 * Having a private constructor guarantees that no more than
210 * one <code>SyncProvider</code> object can exist at a time.
211 */
212 private SyncFactory() {
213 }
214
215 /**
216 * The standard property-id for a synchronization provider implementation
217 * name.
218 */
219 public static final String ROWSET_SYNC_PROVIDER =
220 "rowset.provider.classname";
221 /**
222 * The standard property-id for a synchronization provider implementation
|
183 * If a <code>RowSet</code> object attempts to obtain a <code>MyProvider</code>
184 * object, the <code>SyncFactory</code> will try to locate it. First it searches
185 * for it in the system properties, then it looks in the resource files, and
186 * finally it checks the JNDI context that has been set. The <code>SyncFactory</code>
187 * instance verifies that the requested provider is a valid extension of the
188 * <code>SyncProvider</code> abstract class and then gives it to the
189 * <code>RowSet</code> object. In the following code fragment, a new
190 * <code>CachedRowSet</code> object is created and initialized with
191 * <i>env</i>, which contains the binding to <code>MyProvider</code>.
192 * <PRE>
193 * Hashtable env = new Hashtable();
194 * env.put(SyncFactory.ROWSET_SYNC_PROVIDER, "com.fred.providers.MyProvider");
195 * CachedRowSet crs = new com.sun.rowset.CachedRowSetImpl(env);
196 * </PRE>
197 * Further details on these mechanisms are available in the
198 * <code>javax.sql.rowset.spi</code> package specification.
199 *
200 * @author Jonathan Bruce
201 * @see javax.sql.rowset.spi.SyncProvider
202 * @see javax.sql.rowset.spi.SyncFactoryException
203 * @since 1.5
204 */
205 public class SyncFactory {
206
207 /**
208 * Creates a new <code>SyncFactory</code> object, which is the singleton
209 * instance.
210 * Having a private constructor guarantees that no more than
211 * one <code>SyncProvider</code> object can exist at a time.
212 */
213 private SyncFactory() {
214 }
215
216 /**
217 * The standard property-id for a synchronization provider implementation
218 * name.
219 */
220 public static final String ROWSET_SYNC_PROVIDER =
221 "rowset.provider.classname";
222 /**
223 * The standard property-id for a synchronization provider implementation
|