You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Peter Cousins <pe...@itemfield.com> on 2006/09/12 22:25:17 UTC
Binding Context?
I want to access context information specific to a binding in my server
component implementation in Tuscany.
Examples of binding specific context are: JMS queue name or message
properties, HTTP headers, and so on. JBI/JSR208 use the NMR message
header to provide access to such information. Celtix provides a thread
local context object to provide such access.
The usage scenario where I would need this is when my server component
is a router for other services and needs to route based upon this
information.
Is there a threadlocal for it? Is there already a standard way of doing
this across all bindings, or is it "binding proprietary"? I didn't see
this in other bindings unless I am missing something.
Any pointer to examples or source code showing how this is supported, or
suggestions on adding it would be appreciated.
Thanks...PC
Re: Binding Context?
Posted by ant elder <an...@gmail.com>.
On 9/13/06, Jeremy Boynes <jb...@apache.org> wrote:
I think this can be done using normal SCA components whose service
> interfaces have parameters that are "IT data objects" - for example,
> Peter's router could be passed a SDO DataObject containing the full
> message (with headers) or an alternative implementation could be
> passed a JAXB object. It could flow that on by invoking the
> appropriate target reference passing the same or a mutated object.
Something like this would be really useful, I've been wanting to do this
ever since looking at Tuscany. How about having this function be a goal of
the next release after M2?
...ant
Re: Binding Context?
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I guess we all agree that we need such a featurean what really matters is
how it fits into the programming model.
Please see more comments inline.
Thanks,
Raymond
----- Original Message -----
From: "Jeremy Boynes" <jb...@apache.org>
To: <tu...@ws.apache.org>
Sent: Tuesday, September 12, 2006 4:13 PM
Subject: Re: Binding Context?
> On Sep 12, 2006, at 3:18 PM, Raymond Feng wrote:
>
>> Hi, Peter.
>>
>> Thank you for bringing this requirement to the table even though we
>> don't have this feature in Tuscany yet.
>>
>> First of all, I think it's a valid requirement to support context
>> propagation for service invocations, especially for remote service over
>> a protocol such as SOAP or JMS.
>>
>> By my experience, we need to have the following pieces:
>>
>> a) The invocation message should be able to convey context (as headers)
>> in addtion to the business data (body) accross wirings
>> b) Binding extensions will be responsible to exchange context between
>> the binding-specific protocol and the SCA component infrastructure.
>> c) Context can be produced and consumed by interceptors and binding/
>> component extensions.
>> d) Need some API to allow applications to produce/consume context in
>> certain scopes.
>>
>> Any contributions are welcome.
>
> What concerns me is leaking wiring information to the component
> implementations. That basically violates the entire goal of SCA assembly
> as it puts wiring and infrastructure back into application code.
>
I agree d) doesn't fit the SCA programming model well.
> What Peter is describing sounds more like an "infrastructure" component
> (tied to the IT structure) rather than true "business" (application)
> function. One could say that the application here is an IT one and wants
> the entire JMS/SOAP/XML/RMI message - and that the "application" in this
> case is wiring-aware (e.g. an RMI mediator may not work well with a SOAP
> message).
>
> I think this can be done using normal SCA components whose service
> interfaces have parameters that are "IT data objects" - for example,
> Peter's router could be passed a SDO DataObject containing the full
> message (with headers) or an alternative implementation could be passed a
> JAXB object. It could flow that on by invoking the appropriate target
> reference passing the same or a mutated object.
>
Could this be achieved by @Autowire?
Another issue is how is the context related to the policy framework. I
assume QoSs heavily depend on context propagation.
> There is a separate issue about flow-through context that transfers from
> a inbound request to an outbound one. However, this is state managed
> totally by the framework and would never need to be exposed in the
> application programming model.
>
Agree.
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: Binding Context?
Posted by Jeremy Boynes <jb...@apache.org>.
On Sep 12, 2006, at 3:18 PM, Raymond Feng wrote:
> Hi, Peter.
>
> Thank you for bringing this requirement to the table even though we
> don't have this feature in Tuscany yet.
>
> First of all, I think it's a valid requirement to support context
> propagation for service invocations, especially for remote service
> over a protocol such as SOAP or JMS.
>
> By my experience, we need to have the following pieces:
>
> a) The invocation message should be able to convey context (as
> headers) in addtion to the business data (body) accross wirings
> b) Binding extensions will be responsible to exchange context
> between the binding-specific protocol and the SCA component
> infrastructure.
> c) Context can be produced and consumed by interceptors and binding/
> component extensions.
> d) Need some API to allow applications to produce/consume context
> in certain scopes.
>
> Any contributions are welcome.
What concerns me is leaking wiring information to the component
implementations. That basically violates the entire goal of SCA
assembly as it puts wiring and infrastructure back into application
code.
What Peter is describing sounds more like an "infrastructure"
component (tied to the IT structure) rather than true
"business" (application) function. One could say that the application
here is an IT one and wants the entire JMS/SOAP/XML/RMI message - and
that the "application" in this case is wiring-aware (e.g. an RMI
mediator may not work well with a SOAP message).
I think this can be done using normal SCA components whose service
interfaces have parameters that are "IT data objects" - for example,
Peter's router could be passed a SDO DataObject containing the full
message (with headers) or an alternative implementation could be
passed a JAXB object. It could flow that on by invoking the
appropriate target reference passing the same or a mutated object.
There is a separate issue about flow-through context that transfers
from a inbound request to an outbound one. However, this is state
managed totally by the framework and would never need to be exposed
in the application programming model.
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: Binding Context?
Posted by Raymond Feng <en...@gmail.com>.
Hi, Peter.
Thank you for bringing this requirement to the table even though we don't
have this feature in Tuscany yet.
First of all, I think it's a valid requirement to support context
propagation for service invocations, especially for remote service over a
protocol such as SOAP or JMS.
By my experience, we need to have the following pieces:
a) The invocation message should be able to convey context (as headers) in
addtion to the business data (body) accross wirings
b) Binding extensions will be responsible to exchange context between the
binding-specific protocol and the SCA component infrastructure.
c) Context can be produced and consumed by interceptors and
binding/component extensions.
d) Need some API to allow applications to produce/consume context in certain
scopes.
Any contributions are welcome.
Thanks,
Raymond
----- Original Message -----
From: "Peter Cousins" <pe...@itemfield.com>
To: <tu...@ws.apache.org>
Sent: Tuesday, September 12, 2006 1:25 PM
Subject: Binding Context?
I want to access context information specific to a binding in my server
component implementation in Tuscany.
Examples of binding specific context are: JMS queue name or message
properties, HTTP headers, and so on. JBI/JSR208 use the NMR message
header to provide access to such information. Celtix provides a thread
local context object to provide such access.
The usage scenario where I would need this is when my server component
is a router for other services and needs to route based upon this
information.
Is there a threadlocal for it? Is there already a standard way of doing
this across all bindings, or is it "binding proprietary"? I didn't see
this in other bindings unless I am missing something.
Any pointer to examples or source code showing how this is supported, or
suggestions on adding it would be appreciated.
Thanks...PC
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org
Re: Binding Context?
Posted by Raymond Feng <en...@gmail.com>.
Hi, Peter.
Thank you for bringing this requirement to the table even though we don't
have this feature in Tuscany yet.
First of all, I think it's a valid requirement to support context
propagation for service invocations, especially for remote service over a
protocol such as SOAP or JMS.
By my experience, we need to have the following pieces:
a) The invocation message should be able to convey context (as headers) in
addtion to the business data (body) accross wirings
b) Binding extensions will be responsible to exchange context between the
binding-specific protocol and the SCA component infrastructure.
c) Context can be produced and consumed by interceptors and
binding/component extensions.
d) Need some API to allow applications to produce/consume context in certain
scopes.
Any contributions are welcome.
Thanks,
Raymond
----- Original Message -----
From: "Peter Cousins" <pe...@itemfield.com>
To: <tu...@ws.apache.org>
Sent: Tuesday, September 12, 2006 1:25 PM
Subject: Binding Context?
I want to access context information specific to a binding in my server
component implementation in Tuscany.
Examples of binding specific context are: JMS queue name or message
properties, HTTP headers, and so on. JBI/JSR208 use the NMR message
header to provide access to such information. Celtix provides a thread
local context object to provide such access.
The usage scenario where I would need this is when my server component
is a router for other services and needs to route based upon this
information.
Is there a threadlocal for it? Is there already a standard way of doing
this across all bindings, or is it "binding proprietary"? I didn't see
this in other bindings unless I am missing something.
Any pointer to examples or source code showing how this is supported, or
suggestions on adding it would be appreciated.
Thanks...PC
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org