throw new ServletException("Can not find configuration object");
}
if( configurationObj instanceof DateServletConfiguration ){
configuration = (DateServletConfiguration)configurationObj;
DateSourceCouchWithCluster dateSource;
try {
dateSource = new DateSourceCouchWithCluster(configuration.getAtlasDesignDocument());
} catch (Exception e) {
throw new ServletException("Unable to create date source",e);
}
actions = new DateServiceActions(dateSource);
try {
robot = new DateRobotThread(configuration.getAtlasDesignDocument(), dateSource.getClusterTree());
robot.start();
} catch (Exception e) {
throw new ServletException("Unable to start date robot",e);
}