tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Feng" <enjoyj...@gmail.com>
Subject Re: Java-Impl-Runtime and DataBinding
Date Sun, 15 Apr 2007 08:05:22 GMT

I think you could copy/port the following package into 


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.


----- Original Message ----- 
From: "Jean-Sebastien Delfino" <jsdelfino@apache.org>
To: <tuscany-dev@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

View raw message