} catch (RegistryException e) {
String msg =
"Error in reading the rule resource content. resource path: " +
StratosConstants.THROTTLING_RULES_PATH + ".";
log.error(msg, e);
throw new ThrottlingException(msg, e);
} catch (Exception e) {
String msg = "Error in loading the rules.";
log.error(msg, e);
throw new ThrottlingException(msg, e);
}
try {
ruleSetDescription.setRuleSource(ruleContentResource.getContentStream());
} catch (RegistryException e) {
String msg = "Error in loading the rules from the content stream.";
log.error(msg, e);
throw new ThrottlingException(msg, e);
}
// ruleSetDescription.setBindURI("file:" + ruleFile);
String uri;
try {
uri = ruleEngine.addRuleSet(ruleSetDescription);
} catch (Exception e) {
String msg = "Error in compiling the rules.";
log.error(msg, e);
throw new ThrottlingException(msg, e);
}
SessionDescription sessionDescription = new SessionDescription();
sessionDescription.setSessionType(SessionDescription.STATELESS_SESSION);
sessionDescription.setRuleSetURI(uri);