Пример #1
0
 private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
   // Default state initialization happens here
   ois.defaultReadObject();
   // Initialization of transient Res Bundle happens here .
   try {
     resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }
Пример #2
0
 /**
  * Creates an <code>RIOptimisticProvider</code> object initialized with the fully qualified class
  * name of this <code>SyncProvider</code> implementation and a default reader and writer.
  *
  * <p>This provider is available to all disconnected <code>RowSet</code> implementations as the
  * default persistence provider.
  */
 public RIOptimisticProvider() {
   providerID = this.getClass().getName();
   reader = new CachedRowSetReader();
   writer = new CachedRowSetWriter();
   try {
     resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }
Пример #3
0
 /**
  * Modifies the data source lock severity according to the standard <code>SyncProvider</code>
  * classifications.
  *
  * @param datasource_lock An <code>int</code> indicating the level of locking to be set; must be
  *     one of the following constants:
  *     <PRE>
  *       SyncProvider.DATASOURCE_NO_LOCK,
  *       SyncProvider.DATASOURCE_ROW_LOCK,
  *       SyncProvider.DATASOURCE_TABLE_LOCK,
  *       SyncProvider.DATASOURCE_DB_LOCk
  * </PRE>
  *
  * @throws SyncProviderException if the parameter specified is not <code>
  *     SyncProvider.DATASOURCE_NO_LOCK</code>
  */
 public void setDataSourceLock(int datasource_lock) throws SyncProviderException {
   if (datasource_lock != SyncProvider.DATASOURCE_NO_LOCK) {
     throw new SyncProviderException(resBundle.handleGetObject("riop.locking").toString());
   }
 }