Hi,
While doing the work related to component properties, I found that the
PojoComponentType sidefile based loading of componentType info does not work
and ends up in a...
org.apache.tuscany.spi.loader.UnrecognizedElementException: {
http://www.osoa.org/xmlns/sca/1.0}componentType [{
http://www.osoa.org/xmlns/sca/1.0}componentType]
The reason for this is that the LoaderRegistry tries to narrow a
ComponentType instance to a PojoComponentType after loading the info from
the sidefile.
The other implemenation containers (js, groovy, ruby) do not have this
problem because the request the LoaderRegistry to return an instance of the
base type (i.e.ComponentType) itself which is then copied over to a
specialied one.
There are some specific reasons for having specialized ComponentTypes as
against just the base one, such as to include additional configurations for
scope, lifecylce (init and destroy methods). There is also a related JIRA
for this http://issues.apache.org/jira/browse/TUSCANY-83
In my opinion, support for loading componentType info from side files is
fundamental and all the more critical for the Java container. To go forward
into M2 asap, could we for now do the same in Java Container as being done
in the other containers.. i.e. simply request the LoaderRegistry for the
base ComponentType and then copy it over to the PojoComponentType.
What is the community's view on this?
Thanks
- Venkat