[Design the new POJO MicroContainer] - Possible problem with bean-deployer_2_0.xsd
by david.lloyd@jboss.com
IDEA does not like .xml files that use a namespace attached to the bean-deployer schema (since the extraction of the jboss-beans-common stuff into a separate file I suspect). And the IDEA folks say that it's an XSD problem, as other validation tools come to the same conclusion.
The problem is that elements within top-level "bean" elements are all marked invalid. The errors reported are as follows:
/home/david/src/java/microcontainer/trunk/kernel/src/main/resources/schema/bean-deployer_2_0.xsd
| Error:Error:line (139)rcase-RecurseLax.2: There is not a complete functional mapping between the particles.
| Error:Error:line (139)src-redefine.6.2.2: Group 'valueGroup' does not properly restrict the group it redefines; constraint violated: 'rcase-RecurseLax.2'.
Note that the error location is in the XSD file, not the jboss-beans.xml file that I'm actually validating.
Is this our problem or theirs?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187421#4187421
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187421
17 years, 5 months
[Design the new POJO MicroContainer] - Re: JBMICROCONT-380; constructor (property) matching
by adrian@jboss.org
Like I said on the JIRA issue, its not possible in general.
The only way to get close would be for the ValueMetaData to say
that it doesn't need the type before you can get the value.
Then you could invoke getValue(TypeInfo, ClassLoader)
(with null for the TypeInfo) before you determine the constructor.
But you'd still need to extend the fuzzy match processing
to not only look at the exact type but also all the interfaces
of the value returned.
Even then you could still get an ambiguity, e.g. in the example on the JIRA issue
if the injection implemented both Kernel and Controller.
This particular issue would probably be better resolved if we just
changed the BeanMetaDataDeployer to use @Inject for the controller
so you don't have to specify it in the xml.
The only reason all the different config mechanisms exist
(constructors/setters) is supposedly for backwards compatiblity
but the example from embedded shows that the ambiguous constructor
breaks that anyway. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187392#4187392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187392
17 years, 5 months