This content has been marked as final.
Show 6 replies
-
1. Re: JBoss XB on IBM VM
kabirkhan Jun 23, 2009 12:34 PM (in response to kabirkhan)I've run the tests for MC 2.0.6.GA on IBMs JDK and added some extra information to verify what I thought in the last post.
The question is why, it works on Sun's JDK. -
2. Re: JBoss XB on IBM VM
kabirkhan Jun 23, 2009 12:38 PM (in response to kabirkhan)For the record, doing
<introduction expr="has(* *->method())"> <interfaces>org.jboss.test.microcontainer.beans.IntroductionInterface</interfaces> </introduction>
works and correctly sets@XmlAttribute(name="expr") public void setExpr(String expr) { this.expr = expr; }
in https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.6.GA/aop-mc-int/src/main/java/org/jboss/aop/microcontainer/beans/metadata/IntroductionBeanMetaDataFactory.java -
3. Re: JBoss XB on IBM VM
aloubyansky Jun 23, 2009 6:05 PM (in response to kabirkhan)What if you enable trace for org.jboss.xb.builder? It should tell you how the properties are bound. Maybe there is an issue with reading Java annotations?
-
4. Re: JBoss XB on IBM VM
kabirkhan Jun 24, 2009 7:19 AM (in response to kabirkhan)The output looks the same for IBM and Sun JDK:
SUN11:48:24,761 TRACE [JBossXBBuilder] Checking property clazz for org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory type=java.lang.String 11:48:24,761 TRACE [JBossXBBuilder] Checking property clazz for org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory type=java.lang.String 11:48:24,761 TRACE [JBossXBBuilder] resolving type java.lang.String 11:48:24,761 TRACE [JBossXBBuilder] resolving type java.lang.String 11:48:24,761 TRACE [JBossXBBuilder] resolved type java.lang.String binding=org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding@feb2ea[{http://www.w3.org/2001/XMLSchema}string] 11:48:24,761 TRACE [JBossXBBuilder] resolved type java.lang.String binding=org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding@feb2ea[{http://www.w3.org/2001/XMLSchema}string] 11:48:24,761 TRACE [JBossXBBuilder] Bound attribute class type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz propertyType=ReflectClassInfoImpl@945e31{name=java.lang.String}, normalizeSpace=false 11:48:24,761 TRACE [JBossXBBuilder] Bound attribute class type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz propertyType=ReflectClassInfoImpl@945e31{name=java.lang.String}, normalizeSpace=false 11:48:24,761 TRACE [JBossXBBuilder] Ignore not element @XmlAttribute for type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz 11:48:24,761 TRACE [JBossXBBuilder] Ignore not element @XmlAttribute for type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz
IBM12:01:04,604 TRACE [JBossXBBuilder] Checking property clazz for org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory type=java.lang.String 12:01:04,604 TRACE [JBossXBBuilder] Checking property clazz for org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory type=java.lang.String 12:01:04,604 TRACE [JBossXBBuilder] resolving type java.lang.String 12:01:04,604 TRACE [JBossXBBuilder] resolving type java.lang.String 12:01:04,604 TRACE [JBossXBBuilder] resolved type java.lang.String binding=org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding@78be78be[{http://www.w3.org/2001/XMLSchema}string] 12:01:04,604 TRACE [JBossXBBuilder] resolved type java.lang.String binding=org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding@78be78be[{http://www.w3.org/2001/XMLSchema}string] 12:01:04,605 TRACE [JBossXBBuilder] Bound attribute class type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz propertyType=ReflectClassInfoImpl@2fac2fac{name=java.lang.String}, normalizeSpace=false 12:01:04,605 TRACE [JBossXBBuilder] Bound attribute class type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz propertyType=ReflectClassInfoImpl@2fac2fac{name=java.lang.String}, normalizeSpace=false 12:01:04,605 TRACE [JBossXBBuilder] Ignore not element @XmlAttribute for type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz 12:01:04,605 TRACE [JBossXBBuilder] Ignore not element @XmlAttribute for type=org.jboss.aop.microcontainer.beans.metadata.IntroductionBeanMetaDataFactory property=clazz
I am not sure if I am looking in the right place, so I'll zip up and send you the full output.
One thing that comes to mind might be that I am attempting to override how the class attribute is handled:@JBossXmlSchema(namespace="urn:jboss:aop-beans:1.0", elementFormDefault=XmlNsForm.QUALIFIED) @XmlRootElement(name="introduction") @XmlType(name="introductionType", propOrder={}) public class IntroductionBeanMetaDataFactory extends AspectManagerAwareBeanMetaDataFactory implements BeanMetaDataFactory { ... @XmlAttribute(name="class") public void setClazz(String clazz) { this.clazz = clazz; } } public abstract class AspectManagerAwareBeanMetaDataFactory extends GenericBeanFactoryMetaData { ... } @XmlRootElement(name="beanfactory") @XmlType(name="beanfactoryType", propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "create", "start", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"}) public class GenericBeanFactoryMetaData extends JBossObject implements BeanMetaDataFactory, Serializable { ... @XmlAttribute(name="class") public void setBean(String bean) { this.bean = bean; } }
Although this works on Sun, maybe I should get rid of IBMDF.setClazz() and try to use the bean value from the super class instead? -
5. Re: JBoss XB on IBM VM
aloubyansky Jun 24, 2009 8:24 AM (in response to kabirkhan)Of course, that's the problem. You can't bind two different properties to the same attribute. If you look at the log you will see that one binding overrides the other. The difference between Sun and IBM is the order.
-