Reputation: 11
I am using the Jersey module, Can anybody tell me how to access the mule message properties from within a jersey component?
I need to have access to one of the objects stored in the message properties.
Upvotes: 1
Views: 561
Reputation: 33413
I've checked the source code and, at least in 3.3.1, it doesn't appear the Mule injects any custom @Context
, which could have including the MuleEvent
(this the message and its properties).
So the only thing I can think of is to use the deprecated static accessor to the in-flight event: org.mule.RequestContext.getEvent()
.
MuleSoft may remove it any time though so this is not future proof. Hopefully, when they'll drop it, they'll also provide a replacement that can be used in JAX-RS resources.
Upvotes: 1