2016-03-14 16:51 GMT+01:00 jllado <[email protected]>:

> I'm afraid it not work :_(.  I'm still getting the warning when I call to
> the
> swagger end point.
>
> Here you are the code:
> @ApplicationPath("resources")
> public class RestServer extends Application {
>
>     private Set singletons = new HashSet<>();
>
>     public RestServer() {
>         singletons.add(new
> JacksonJsonProvider(JsonParser.defaultJacksonObjectMapper()));
>         singletons.add(new JAXRSBeanValidationInInterceptor());
>     }
>
>     @Override
>     public Set getSingletons() {
>         return singletons;
>     }
>
>     @Override
>     public Set<Class&lt;?>> getClasses() {
>         Set<Class&lt;?>> classes = new HashSet<>();
>         classes.add(CityService.class);
>         classes.add(BookingService.class);
>         classes.add(AuthenticationService.class);
>         classes.add(ApiListingResource.class);
>         return classes;
>     }
>
> }
>
> If I debug the call and I check the stack trace, I see the following calls:
> <http://tomee-openejb.979440.n4.nabble.com/file/n4677900/stack_trace.png>
>
> And I've tried to put a break point at getSingletons but never stoped.
>
>
This part is weird, looks like you don't use this Application then. Can you
check it is really read?


> Any idea?
>
> 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-tp4677891p4677900.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to