Hello

I'm using Apache CXF 3.1.9 with Tomcat 7. I have written a JAX-RS
application with a JAX-RS resource and subclassed Application class. I
realized that the JAX-RS resource is per-request scoped by default. I would
like to make it application scoped. Using @Singleton doesnt work.

I could override the getSingletons() method of my Application subclass, but
doing that turns off auto scanning of @Provider classes. Auto scanning is
important for my application because I'm using a library which has filters
that have to be included automatically by scanning.

How can I create a singleton JAX-RS resource and still use auto scanning of
@Provider capability.

Thanks,
Aruna.

Reply via email to