[
http://issues.apache.org/jira/browse/TUSCANY-773?page=comments#action_12439779
]
Venkatakrishnan commented on TUSCANY-773:
-----------------------------------------
Hi Raymond,
I have gone thro this and here are some questions / concerns: -
1) There is an assumption that the java type for the property is known which
may not be true. All that might be known is the xml type. This will work if
the componenttype loading is done thro introspection because the introspection
processors set the JavaType of the property. But if you are loading thro the
componentType file, the SimplePropertyObjectFactory could have problems. right?
2) Talking about the componentType side file brings me to a 'blocker' that I
experience. I have already mentioned about this earlier. It is about not
being able to use the component type side file for java components. I have
tried it several times and I end up with
org.apache.tuscany.spi.loader.UnrecognizedElementException:
{http://www.osoa.org/xmlns/sca/1.0}componentType
{http://www.osoa.org/xmlns/sca/1.0}componentType]
I want to know if this is a problem that I am alone experiencing. Should I
raise a JIRA for this?
3) I see that the value object factory gets created for the PropertyValue in
the ComponentLoader itself. Over here we transform the value xml to java
objects. Having this function in the ComponentLoader will mean that this will
be done for all implementations (java, javascript, rubyscript, groovy).
Now for the scripts, where is the JavaType for the property available? All
that might get mentioned is just about the xml type in the componentType file.
This is again where the SimplePropertyObjectFactory could have problems (just
about the same as what I have said above in point 1).
That is why I had put the function of converting the propertyvalues xml to java
objects in the JavaComponentBuilder. This way the implementation builders just
about get the xml document and it is upto them how they transform it to suit
the underlying implementation (java, javascript, ruby,groovy). So in our Java
Implementation, the builder simply transforms this to Java objects. Similarly
I would expect the JS Builder to convert this xml data to JS objects (dono how
do this though :)). Isn't this approach right - am I missing some point ?
4) Is there something that you are doing about transforming complex xml content
to java objects ? Can we not have the JavaPropertyFactory that I proposed, in
place atleast upto the point when this is ready from the databinding framework
?
Let me know how we can go about this futher.
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
> Assigned To: Raymond Feng
> Attachments: rfeng.patch, Tuscany-kernel-core-02-Oct.diff,
> Tuscany-kernel-spi-02-Oct.diff, Tuscany-sca-kernel-core-03-Oct.diff,
> Tuscany-sca-kernel-spi-03-Oct.diff, Tuscany-spec-sca-02-Oct.diff,
> Tuscany-spec-sca-03-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]