You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Venkata Krishnan <fo...@gmail.com> on 2007/04/12 18:35:16 UTC
Java-Impl-Runtime and DataBinding
Hi,
I have got basic properties to work with the java-implementation-runtime.
Here are some observations that I'd like to validate...
- assuming that we load the assembly models from xml the core will always
hand out to the 'implementation runtimes'' such as 'java-implementation' a
Document object for the value of a property. The implementation runtimes
are responsible for invoking the databinding framework to convert the
property value from document to whatever form... for example Document to
JavaBean. Is this right?
If this is right, then I guess the databinding framework need to be plugged
into the java-impl-runtime? How is this to be ideally done in the current
architecture? I suppose, dragging it in as a dependency and using it as yet
another dependent class library is not the way.. so could somebody please
help me with some pointers to do this.
Thanks
- Venkat
Re: Java-Impl-Runtime and DataBinding
Posted by Raymond Feng <en...@gmail.com>.
Hi,
I think you could copy/port the following package into
tuscany-core-databinding:
https://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/property
Then in JavaComponentBuilder, add the following code (need some porting) and
invoke handleProperties() at the end of the build() method.
private void handleProperties(Component definition, JavaAtomicComponent
component) {
for (ComponentProperty property : definition.getProperties()) {
ObjectFactory<?> factory = new
PropertyObjectFactoryImpl(...).createObjectFactory(property); // need to
deal with multi-valued as well
if (factory != null) {
component.addPropertyFactory(property.getName(), factory);
}
}
}
Adding dependency to tuscany-core-databinding in implementation-java-runtime
is fine for now.
Thanks,
Raymond
----- Original Message -----
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Saturday, April 14, 2007 1:42 PM
Subject: Re: Java-Impl-Runtime and DataBinding
> Venkata Krishnan wrote:
>> Hi,
>>
>> I have got basic properties to work with the java-implementation-runtime.
>> Here are some observations that I'd like to validate...
>>
>> - assuming that we load the assembly models from xml the core will always
>> hand out to the 'implementation runtimes'' such as 'java-implementation'
>> a
>> Document object for the value of a property. The implementation runtimes
>> are responsible for invoking the databinding framework to convert the
>> property value from document to whatever form... for example Document to
>> JavaBean. Is this right?
>
> Yes that sounds right, this is how it currently works. However, I think it
> would be good to change this at some point to represent the value of
> simple type properties as a String for example. I'm not sure why we
> currently need a Document to hold simple type property values.
>
>>
>> If this is right, then I guess the databinding framework need to be
>> plugged
>> into the java-impl-runtime? How is this to be ideally done in the
>> current
>> architecture? I suppose, dragging it in as a dependency and using it as
>> yet
>> another dependent class library is not the way.. so could somebody please
>> help me with some pointers to do this.
>>
>
> I think it's OK to have a dependency on the databinding framework, but you
> probably don't want to depend on the individual databinding
> implementations.
>
> Raymond, maybe you can jump in here, since you've done much work on the
> databinding framework recently.
>
>>
>> Thanks
>>
>> - Venkat
>>
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> 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: Java-Impl-Runtime and DataBinding
Posted by Jean-Sebastien Delfino <js...@apache.org>.
Venkata Krishnan wrote:
> Hi,
>
> I have got basic properties to work with the java-implementation-runtime.
> Here are some observations that I'd like to validate...
>
> - assuming that we load the assembly models from xml the core will always
> hand out to the 'implementation runtimes'' such as
> 'java-implementation' a
> Document object for the value of a property. The implementation runtimes
> are responsible for invoking the databinding framework to convert the
> property value from document to whatever form... for example Document to
> JavaBean. Is this right?
Yes that sounds right, this is how it currently works. However, I think
it would be good to change this at some point to represent the value of
simple type properties as a String for example. I'm not sure why we
currently need a Document to hold simple type property values.
>
> If this is right, then I guess the databinding framework need to be
> plugged
> into the java-impl-runtime? How is this to be ideally done in the
> current
> architecture? I suppose, dragging it in as a dependency and using it
> as yet
> another dependent class library is not the way.. so could somebody please
> help me with some pointers to do this.
>
I think it's OK to have a dependency on the databinding framework, but
you probably don't want to depend on the individual databinding
implementations.
Raymond, maybe you can jump in here, since you've done much work on the
databinding framework recently.
>
> Thanks
>
> - Venkat
>
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org