4 Replies Latest reply on Aug 7, 2008 10:20 AM by starksm64

    MDB.getActivationConfigProperties handling of no destination

    starksm64

      For the JBCTS-604 issue, the mdb container needs to be defaulting the destination type. I have fixed the deployment error using this change to the MDB.getActivationConfigProperties:

       // We need a destiation-type
       ActivationConfigPropertyMetaData destTypeMD = result.get(DESTINATION_TYPE);
       if (destTypeMD == null)
       {
       JBossMessageDrivenBeanMetaData md = (JBossMessageDrivenBeanMetaData) getMetaData();
       String destinationJNDI = md.getDestinationJndiName();
       try
       {
       InitialContext ctx = new InitialContext();
       String destType = super.getDestinationType(ctx, destinationJNDI);
       ActivationConfigPropertyMetaData metaData = new ActivationConfigPropertyMetaData();
       metaData.setName(DESTINATION_TYPE);
       metaData.setValue(destType);
       result.put(metaData.getName(), metaData);
       }
       catch(Exception e)
       {
       log.warn("Failed to determine destination type", e);
       }
       }
      


      Should I create an ejb3 issue or is there a better way to default this? It would seem the container has the most information on the destination endpoint.