private void registerMailets(String parentMBeanName,Iterator<Mailet> mailets) throws JMException {
  int i=0;
  while (mailets.hasNext()) {
    Mailet mailet=mailets.next();
    MailetManagement mailetManagement=new MailetManagement(mailet.getMailetConfig());
    String mailetMBeanName=parentMBeanName + ",subtype=mailet,index=" + (i++)+ ",mailetname="+ mailetManagement.getMailetName();
    registerMBean(mailetMBeanName,mailetManagement);
    mailetMap.put(mailet,mailetManagement);
  }
}

private void registerMailets ( String parentMBeanName , Iterator < Mailet > mailets ) throws JMException { int i = 0 ; while ( mailets . hasNext ( ) ) { Mailet mailet = mailets . next ( ) ; MailetManagement mailetManagement = new MailetManagement ( mailet . getMailetConfig ( ) ) ; String mailetMBeanName = parentMBeanName + ",subtype=mailet,index=" + ( i ++ ) + ",mailetname=" + mailetManagement . getMailetName ( ) ; registerMBean ( mailetMBeanName , mailetManagement ) ; mailetMap . put ( mailet , mailetManagement ) ; } }
register the mailets as jmx mbeans
