Hi
On 12/03/17 06:37, Aruna Kalagnanam wrote:
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.
Can you explain please, how is this Application registered, do you use a
cxf-rt-rs-http-sci module which ships ServletContextInitializer ?
Thanks, Sergey
Thanks,
Aruna.