Classification: UNCLASSIFIED
Caveats: NONE

Response follows.

Gang

> -----Original Message-----
> From: Simon Nash [mailto:[email protected]]
> Sent: Friday, February 04, 2011 12:00 PM
> To: [email protected]
> Subject: Re: Can application code and interceptor/handler code in
> Tuscany communicate with each other via some context? (UNCLASSIFIED)
> 
> Yang, Gang CTR US USA wrote:
> > Classification: UNCLASSIFIED
> > Caveats: NONE
> >
>  > (cut)
> >
> > Thanks! It's clear now. I looked up RequestContext (don't know why I
> > missed it earlier). It does not seem to support general state
> > propagation - I can set/get arbitrary objects. Can this be opened up
> to
> > allow arbitrary object states?
> >
> Tuscany can't add any methods to this API because it's defined by SCA.
> 
> Tuscany could add some other API to propagate arbitrary state but this
> would be a major departure from the philosophy of SCA and I would have
> serious reservations about this.
> 
> However, the Java ThreadLocal class should enable you to do what you
> need.
> You can add an object to Java thead-local state in your inbound
> handler,
> access or update this object (or add more objects) in your application
> code, and use the results in your outbound handler.

I'm not sure about using ThreadLocal in a service framework environment
for component implementation or even user-added handlers since I don't
know how the framework manages the threads.

Gang

> 
>    Simon
> 
> > Gang
> >
> >>    Simon
> >>
> >>>    Simon
> >>>
> >>> Classification: UNCLASSIFIED
> >>> Caveats: NONE
> >>>
> >>>
> >>>
> >>>
> >
> >
> > Classification: UNCLASSIFIED
> > Caveats: NONE
> >
> >
> >
> >


Classification: UNCLASSIFIED
Caveats: NONE


Reply via email to