[jboss-dev-forums] [Design of EJB 3.0] - default-activation-config?

adrian@jboss.org do-not-reply at jboss.com
Tue Nov 13 17:58:49 EST 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104340#4104340

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104340



More information about the jboss-dev-forums mailing list