cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inteloid <>
Subject Re: Statically access MessageContext
Date Mon, 12 Aug 2013 11:21:07 GMT
We use spring configuration, and can't make our services per request.

The stack is as follows:

Web->JAX-RS Resource->Spring Service (Business Logic)->DB Layer->DB

JAX-RS resources effectively get access to valid MessageContext by
void setMessageContext(MessageContext mc)
The problem is, I don't need it inside my resource methods as they just
forward calls to appropriate business logic services.

Our business services are singletons and this can't be changed for many
reasons. To implement security checks inside them (which are also business
related checks) we need data from MessageContext (well, we'll wrap it in
something fancy and less transport dependent, we need only clinetId and

Currently, I'm trying to build a Utility class, which will be used by
business services, which gets that MessageContext data from some static

Hope I've explained properly, if not I can post some diagrams.

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message