[ http://issues.apache.org/jira/browse/TUSCANY-773?page=all ]

Venkatakrishnan updated TUSCANY-773:
------------------------------------

    Attachment: Tuscany-spec-sca-02-Oct.diff
                Tuscany-kernel-spi-02-Oct.diff
                Tuscany-kernel-core-02-Oct.diff

HI Raymond,

Here are the patches that do the following: -
- Load property values defined in application components copying default values 
wherever the value is absent and the default specified in the corresponding 
componentType.
- Enforces the 'override' options semantics to property defintions in scdls
- Enables the JavaCompnentBuilder to transform the property values from xml 
document form to appropriate java object instances and also creates the 
corresponding object factories.

I have successfully tested this for a simple component as this...

<component name="HelloWorldJavaReference">
        <implementation.java class="helloworld.HelloWorldServiceImpl"/>
        <property name="greeting">
            Hullow
        </property>
        <property name="helloSayer">
            <firstName>Tuscany</firstName>
            <lastName>World</lastName>
        </property>
 </component>

Please review if the approach used is right and scalable.  

Other Concerns
----------------------
*)  I am unable to use the .componentType file.  If I used one then I get the 
following exception:
org.apache.tuscany.spi.loader.UnrecognizedElementException: 
{http://www.osoa.org/xmlns/sca/1.0}componentType 
[{http://www.osoa.org/xmlns/sca/1.0}componentType]
Context stack trace: [application][HelloWorldJavaReference]
    at 
org.apache.tuscany.core.loader.LoaderRegistryImpl.load(LoaderRegistryImpl.java:113)

Looks like there is problem if I mention JavaComponentType.class in the load 
method.  I guess this because all othere containers  have worked around this 
aspect.

Am I missing something here?

*)  When I initially clipped the existing property value loading behaviour in 
the ComponentLoader, the system components could never get initialized.  To go 
forward with this, I decided to address only application components.  To this 
end, I retained the existing behaviour when the component is a 
SystemImplementation and changed it for other cases.   I am not clear about the 
direction for this.

Thanks 

- Venkat



> Fix Property Value Loading from Component Definitions
> -----------------------------------------------------
>
>                 Key: TUSCANY-773
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-773
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-M2
>            Reporter: Venkatakrishnan
>         Attachments: Tuscany-kernel-core-02-Oct.diff, 
> Tuscany-kernel-spi-02-Oct.diff, Tuscany-spec-sca-02-Oct.diff
>
>
> Currently property loading for application components does not work.  There 
> is NPE exception thrown when creating a property instance factory based on 
> the property value defined in the Component Defn.  
> Also the property loading works only for simply types whose values can be 
> represented as a simple xml text content.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to