use of org.apache.johnzon.jaxrs.WadlDocumentMessageBodyWriter in project tomee by apache.
the class CxfRsHttpListener method addMandatoryProviders.
private void addMandatoryProviders(final Collection<Object> instances, final ServiceConfiguration serviceConfiguration) {
if (SystemInstance.get().getProperty("openejb.jaxrs.jsonProviders") == null) {
if (!shouldSkipProvider(WadlDocumentMessageBodyWriter.class.getName())) {
instances.add(new WadlDocumentMessageBodyWriter());
}
}
if (!shouldSkipProvider(EJBExceptionMapper.class.getName())) {
instances.add(new EJBExceptionMapper());
}
if (!shouldSkipProvider(ValidationExceptionMapper.class.getName())) {
instances.add(new ValidationExceptionMapper());
final String level = SystemInstance.get().getProperty("openejb.cxf.rs.bval.log.level", serviceConfiguration.getProperties().getProperty(CXF_JAXRS_PREFIX + "bval.log.level"));
if (level != null) {
try {
LogUtils.getL7dLogger(ValidationExceptionMapper.class).setLevel(Level.parse(level));
} catch (final UnsupportedOperationException uoe) {
LOGGER.warning("Can't set level " + level + " on " + "org.apache.cxf.jaxrs.validation.ValidationExceptionMapper logger, " + "please configure it in your logging framework.");
}
}
}
}
Aggregations