In general, this won't work in a federated world as there might not
be any representation of the composite on the runtime node.
I think what you're trying to do here is define a common resource for
use in the target runtime - very similar to how we're planning to
define ClassLoaders as part of the PCS. This would involve including
a definition of the resource in the PCS, perhaps something like:
<sdo:context id='uri for helper context'>
<import schemaId="uri of contributed schema"/>
</sdo.context>
which would be picked up by a SDO resource unmarshaller which would
handle the registration with the SDO runtime.
--
Jeremy
On Feb 28, 2007, at 1:41 PM, Raymond Feng wrote:
Hi,
In the databinding framework, we need to attach some context such
as the databinding-specific typing system to a composite. For
example, in SDO databinding, we use "import.sdo" to populate SDO
types into HelperContext for the given composite and the
HelperContext will be used later on for data transformation.
What's the best way to achieve this? This is required to get
databinding-sdo back to work in trunk again.
There are some options coming into my mind:
1) Maintain a map keyed by the URI of the composite some where in
the databding-sdo code? (I guess we need to register a
"RuntimeEventListener" to listen on "ComponentEvent" so that we can
respond to the composite lifecycle.)
2) Get the ScopeContainer for the composite, and register a
SystemSingletonAtomicComponent which wraps the composite-scoped
HelperContext?
Any suggestion will be appreciated.
Thanks,
Raymond
----- Original Message ----- From: "Raymond Feng"
<[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Wednesday, February 07, 2007 10:47 AM
Subject: Re: DataBindingInterceptor and PassByValueInterceptor
question
Yes, I agree. And that should be part of the efforts to support
the load/resolve/build for SCDL extensibility elements so that
they can be handled in a pluggable way.
Thanks,
Raymond
----- Original Message ----- From: "Jim Marino"
<[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Wednesday, February 07, 2007 10:37 AM
Subject: Re: DataBindingInterceptor and PassByValueInterceptor
question
On Feb 7, 2007, at 10:21 AM, Raymond Feng wrote:
Hi, Jim.
Let me explain the DataBindingInterceptor part.
In this case, I pass the CompositeComponent as a metadata in the
transformation context so that the transformers can access the
extensions (SCAObject.getExtensions) of the CompositeComponent.
The extensions contain some information (such as the TypeHelper
for the composite) built from SCDL extensibility elements such
as <import.sdo>. This is a workaround to support the load/build
for SCDL extensibility elements.
Thanks Raymond for the response...
This seems problematic, particularly since we are passing
CompositeComponent just to use extensibility elements in an
untyped way. Wouldn't it be better to do this through some type
of typed context (e.g. for extensibility elements, which
themselves may need to be untyped) for the post processor? I
generally prefer APIs to be explicit about what they are passing
around.
Jim
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]