Hi,
When I add the JAXRSBeanValidationInInterceptor() to a RestServer
application, then I get the following warning:
Service object is not a singleton, use a custom invoker to validate
I guess is not a problem and I can ignore the warming but I prefer to ask to
prevent a surprice.
The code is the following:
@ApplicationPath("resources")
public class RestServer extends Application {
@Override
public Set getSingletons() {
JacksonJsonProvider p = new
JacksonJsonProvider(JsonParser.defaultJacksonObjectMapper());
Set set = new HashSet<>();
set.add(p);
set.add(new JAXRSBeanValidationInInterceptor());
return set;
}
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> set = new HashSet<>();
set.add(CityService.class);
set.add(BookingService.class);
set.add(AuthenticationService.class);
set.add(ApiListingResource.class);
return set;
}
}
I'm developing it with Tomee 7.0.0-M2 and CXF.
Thanks,
Juan Lladó
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Service-object-is-not-a-singleton-use-a-custom-invoker-to-validate-tp4677891.html
Sent from the TomEE Users mailing list archive at Nabble.com.