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

    default-activation-config?

      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)?

        • 1. Re: default-activation-config?
          wolfc

          The purpose is to have a template of activation config properties in aop.xml for use by multiple MDBs. Burke had for example DLQ authentication in mind.

          • 2. Re: default-activation-config?

             

            "wolfc" wrote:
            The purpose is to have a template of activation config properties in aop.xml for use by multiple MDBs. Burke had for example DLQ authentication in mind.


            I'm not talking about aop.xml, I'm taking about the jboss.xml
            and the annotation on the class, e.g. from the testsuite
            @DefaultActivationSpecs({
             @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue")
             })
            @MessageDriven(activationConfig =
             {
             @ActivationConfigProperty(propertyName="destination", propertyValue="queue/defaultedmdbtest")
             })
            public class DefaultedQueueTestMDB implements MessageListener
            


            It still doesn't make sense that a template from anywhere would override
            the real instance properties from ejb-jar.xml?

            • 3. Re: default-activation-config?
              aloubyansky