import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.sun.rowset.providers.RIOptimisticProvider;
/**
* @version $Revision: 1.15 $
}
return 0;
}
-
+
});
protected final Set<CachedDataSource> broken = Collections.synchronizedSet(new HashSet<CachedDataSource>());
protected final Object monitor = new Object();
worker.setName("DBResourcemanagerWatchThread");
worker.setDaemon(true);
worker.start();
-
- try {
- RIOptimisticProvider rio = new RIOptimisticProvider();
- LOGGER.info("Class " + rio.getClass().getName() + " found.");
- Class clas = this.getClass().getClassLoader().loadClass("com.sun.rowset.providers.RIOptimisticProvider");
- if(clas != null) {
- LOGGER.info("Class " + rio.getClass().getName() + " found by classloader.");
- }
- } catch(Exception exc) {
- LOGGER.info("Failed resolving RIOptimisticProvider class", exc);
- }
}
private void config(Properties ctx) throws Exception {
Collections.reverse(sources);
}
-
+
// loop through available data sources to retrieve data.
while(!sources.isEmpty())
{
public boolean writeData(String statement, ArrayList<String> arguments, String preferredDS) throws SQLException {
return writeDataNoRecovery(statement, arguments, preferredDS);
}
-
+
CachedDataSource findMaster() {
CachedDataSource master = null;
CachedDataSource[] dss = this.dsQueue.toArray(new CachedDataSource[0]);
active = master;
}
}
-
+
return active.writeData(statement, arguments);
} catch(Throwable exc){
String message = exc.getMessage();