3 Replies Latest reply on Dec 1, 2008 7:39 PM by Alexey Loubyansky

    default-activation-config?

    Adrian Brock Master

      What's the purpose of this?

      The schema defines it as a different type, but the new metadata classes
      just use the spec type. This fails, the child is a plain activation-config-property.

      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://www.jboss.com/xml/ns/javaee}default-activation-config-property not found as a child of {http://www.jboss.com/xml/ns/javaee}default-activation-config
       at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:396)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:407)
      


      Also, from what I can tell, it isn't a "default" at all. The default properties override
      the normal properties. e.g. org.jboss.ejb3.mdb.MDB

      
       public Map getActivationConfigProperties()
       {
       HashMap result = new HashMap();
       MessageDriven mdAnnotation = (MessageDriven) resolveAnnotation(MessageDriven.class);
       for (ActivationConfigProperty property : mdAnnotation.activationConfig())
       {
       addActivationSpecProperty(result, property);
       }
      
       DefaultActivationSpecs defaultSpecsAnnotation = (DefaultActivationSpecs)resolveAnnotation(DefaultActivationSpecs.class);
       if (defaultSpecsAnnotation != null)
       {
       for (ActivationConfigProperty property : defaultSpecsAnnotation.value())
       {
       addActivationSpecProperty(result, property);
       }
       }
      
       return result;
       }
      


      Where addActivationSpecProperty() does a map.put() which replaces things with
      the same key.

      I don't see any reason why an annotation (class level) should
      override the xml (instance level)?