ManagementObjectManager mom = Switch.getSwitch().getManagementObjectManager();
String applicationName = ad.getRegistrationName();
String j2eeType = null;
java.util.Set bds = null;
BundleDescriptor bd = null;
// Determine number of modules and initialize the String array
int i = 0;
sArr = new String [ ad.getApplicationClientDescriptors().size() +
ad.getEjbBundleDescriptors().size() +
ad.getRarDescriptors().size() +
ad.getWebBundleDescriptors().size() ];
// App client modules
bds = ad.getApplicationClientDescriptors();
for(Iterator it=bds.iterator(); it.hasNext(); ) {
bd = (BundleDescriptor) it.next();
sArr[i] = ("j2eeType=AppClientModule" + "," +
"name=" + bd.getModuleDescriptor().getArchiveUri() + "," +
"J2EEApplication=" + applicationName);
i++;
}
// Ejb modules
bds = ad.getEjbBundleDescriptors();
for(Iterator it=bds.iterator(); it.hasNext(); ) {
bd = (BundleDescriptor) it.next();
sArr[i] = ("j2eeType=EJBModule" + "," +
"name=" + bd.getModuleDescriptor().getArchiveUri() + "," +
"J2EEApplication=" + applicationName);
i++;
}
// Connector modules
bds = ad.getRarDescriptors();
for(Iterator it=bds.iterator(); it.hasNext(); ) {
bd = (BundleDescriptor) it.next();
sArr[i] = ("j2eeType=ResourceAdapterModule" + "," +
"name=" + bd.getModuleDescriptor().getArchiveUri() + "," +
"J2EEApplication=" + applicationName);
i++;
}
// Web modules
bds = ad.getWebBundleDescriptors();
for(Iterator it=bds.iterator(); it.hasNext(); ) {
bd = (BundleDescriptor) it.next();
sArr[i] = ("j2eeType=WebModule" + "," +
"name=" + bd.getModuleDescriptor().getArchiveUri() + "," +
"J2EEApplication=" + applicationName);
i++;
}