(MBeanConfigurationElement)pdd.query("service", "QueuePostOffice").iterator().next();
(MBeanConfigurationElement)pdd.query("service", "PostOffice").iterator().next();
   public Properties getPostOfficeSQLProperties() throws Exception   {      String databaseType = getDatabaseType();      String persistenceConfigFile =         "server/default/deploy/" + databaseType + "-persistence-service.xml";      log.info("********* Using config file: " + persistenceConfigFile);      URL persistenceConfigFileURL = getClass().getClassLoader().getResource(persistenceConfigFile);      if (persistenceConfigFileURL == null)      {         throw new Exception("Cannot find " + persistenceConfigFile + " in the classpath");      }      ServiceDeploymentDescriptor pdd = new ServiceDeploymentDescriptor(persistenceConfigFileURL);      MBeanConfigurationElement postOfficeConfig =         (MBeanConfigurationElement)pdd.query("service", "QueuePostOffice").iterator().next();      String props = postOfficeConfig.getAttributeValue("SqlProperties");      if (props != null)      {         ByteArrayInputStream is = new ByteArrayInputStream(props.getBytes());         Properties sqlProperties = new Properties();         sqlProperties.load(is);         return sqlProperties;      }      else      {         return null;      }   }