I see in the SCA Java annotations/API spec that its possible to set a ComponentContext that provides access to a RequestContext. Is this mechanism going to be supported?
This allows access to the security subject - but unfortunately does not provide support for passing a general list of properties.
Security is probably the main reason for accessing the header properties, so this may be adequate - but may be worth extending the RequestContext implementation to allow components access to generic properties?
We will provide a mechanism for accessing the exchange context for an invocation for Bean services, but it's not there right now. One solution would be to associate the context with a thread local which the CDI bean can inject into the bean implementation. We will definitely want to support the ability to set/get arbitrary context properties since (as you mentioned) there are many use cases for adding additional context. This applies to SOAP headers, but also to any other binding or implementation which accepts sideband information. It's a bit of a nasty detail in integration, but there's no way to get around it.
Incidentally, the context is already available to use if you are using the core Exchange APIs. So a component has access to the context today. We just haven't added a way to push this into Bean services. Would you mind filing a JIRA so we can track this?
Thanks for your great input, Gary.