void generateMbeanXml ( Definition def , String outputDir ) { String mbeanName = def . getDefaultValue ( ) . toLowerCase ( Locale . US ) ; if ( def . getRaPackage ( ) != null && ! def . getRaPackage ( ) . equals ( "" ) ) { if ( def . getRaPackage ( ) . indexOf ( ' ' ) >= 0 ) { mbeanName = def . getRaPackage ( ) . substring ( def . getRaPackage ( ) . lastIndexOf ( ' ' ) + 1 ) ; } else mbeanName = def . getRaPackage ( ) ; } try { outputDir = outputDir + File . separatorChar + "src" + File . separatorChar + "main" + File . separatorChar + "resources" + File . separatorChar + "jca" ; FileWriter mbfw = Utils . createFile ( mbeanName + ".xml" , outputDir ) ; MbeanXmlGen mbGen = new MbeanXmlGen ( ) ; mbGen . generate ( def , mbfw ) ; mbfw . close ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } }
generate mbean deployment xml