void configureBeanValidators(ServicesFactory factory) {
BeanValidatorService service;
try {
RichFacesBeanValidatorFactory validatorFactory = new RichFacesBeanValidatorFactory();
validatorFactory.init();
service = new BeanValidatorServiceImpl(new ValueExpressionAnalayserImpl(), validatorFactory);
} catch (InitializationException e) {
// JSR-303 is available but not initialised.
service = new DummyBeanValidatorService();
} catch (NoClassDefFoundError e) {
// JSR-303 is not avalable.