[jboss-dev-forums] [Design of EJB 3.0] - MDB.getActivationConfigProperties handling of no destination

scott.stark@jboss.org do-not-reply at jboss.com
Wed Aug 6 17:31:56 EDT 2008


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.


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

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



More information about the jboss-dev-forums mailing list