Hi David
Just in case, it is CXF specific - but if you need to inject more than
one JAX-RS context then it starts making sense considering using it.
UriInfo, SecurityContext, Request, HttpHeaders, HttpServletRequest, etc,
can be injected
Sergey
On 12/09/16 19:16, KARR, DAVID wrote:
-----Original Message-----
From: KARR, DAVID
Sent: Monday, September 12, 2016 10:08 AM
To: [email protected]
Subject: Get request metadata into controller method parameters?
I'd like to add some request metadata diagnostics to my JAX-RS REST
service. For instance, I'd like to get the IP address of the request.
I would imagine I could do this with a servlet filter, but I want to
directly associate it with the request and response. Is it possible to
inject data like this directly into the controller method?
Never mind. @Context and MessageContext does the trick.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/