BTW my main point was that using the JAX-WS request/response context to share information between the application and transport doesn't make the transport directly dependent on JAX-WS. As far as the transport is concerned, it just puts/gets this information to/from the Message. Its then up to the frontend to map this into some form that's consumable by the application (e.g. the JAX-WS request/response context).
If the JAX-WS request/response contexts are not currently tied in with the outbound/inbound Message, then this is an over-sight and nees to be fixed. Certainly BindingProvider.getRequestContext() worked in the old Celtix JAX-WS front-end, so this logic just needs to be ported over to the new architecture. If your main concern is around the cost of copying large context maps to/from the messages, this can largely be avoided via the wrapping pattern currently used to construct the contexts passed to JAX-WS handlers (as long as some care is taken with APPLICATION versus HANDLER scoping of properties). /Eoghan > -----Original Message----- > From: Jiang, Ning (Willem) > Sent: 22 September 2006 09:34 > To: [email protected] > Subject: Re: context question between transport and jaxws front end > > Hi Eoghan, > > Thank you for your replay. > I just went though the JAX-WS BindingProviderImpl, there > were no any code of the context copying work. > I think this work need to be done by my hand :). > > Cheers, > Willem. > > Glynn, Eoghan wrote: > > >Hi Willem, > > > >I'm not sure there's a problem here. > > > >The JMS transport wouldn't have a direct dependency on the > JAX-WS, just > >an assumption that the frontend (whether JAX-WS or not) > provides some > >mechanism to pass context information between the > application and the > >Message thats passed to JMSConduit.send() and returned via the > >MessageObserver.onMessage(). In the case of JAX-WS, this > mechanism is > >the BindingProvider.get{Request|Response}Context() API. However it > >could be something completely different for another frontend. In any > >case, the transport doesn't need to know the detail of this > mechanism, > >it may simply assume some analogous mechanism is supported. > > > >Any properties available in the context are automatically > reflected in > >the Message and vice versa, as the JAX-WS context > implementations are > >simply wrappers around the Message. > > > >Cheers, > >Eoghan > > > > > > > >>-----Original Message----- > >>From: Jiang, Ning (Willem) > >>Sent: 22 September 2006 08:35 > >>To: [email protected] > >>Subject: context question between transport and jaxws front end > >> > >>Hi > >> > >>When I do some clean up work of JMS work and found out that JMS > >>system test and demo provide a feature that the Application > code can > >>get the JMS message header information from the > >>BindingProvider.getResponseContext and setup the JMS message header > >>into the RequestContext. The demo code is in the > >>JMSClientServerTest's utestContextPropogation(). It can't work > >>currently, because the JAXWS front end provide the context > transfer > >>between the JAXWS front end and Messages which are used in the core > >>runtime. > >> > >>If I want to make the current CXF JMSTransport support this > feature, > >>the easiest way is to add the JMS message header context to the > >>BindingProviderImpl's responseContext which in the JAXWS > front end and > >>read the JAXWS front end context information in > JMSTransport module. > >>But I remember that DanK had said that transport module should not > >>depend on the JAXWS front end. > >> > >>If we want keep the transport module have no dependence on > the JAXWS > >>front end, all the JAXWS front end context setup work will > be done in > >>the JAXWS front end by reading the context information from the > >>Message or Exchange Message context. > >>How can the front end know which message context will be > set to the > >>JAXWS front end's context and How can JAXWS context be set to the > >>runtime Message context? > >> > >>I have a raw ideal about the context setting implementation between > >>the transport module and the front end by using the context copy > >>between the JAXWS front end and runtime Message, but it would take > >>some cpu time when the context is huge :(. > >> > >>Any thoughts ? > >> > >>Thanks, > >>Willem > >> > >> > >> > >> > >> > > > > > > > > >
