System.out.println(" "+mgr.getEJBModules(server).length+" EJB JARs");
System.out.println(" "+mgr.getWebModules(server).length+" web apps");
System.out.println(" "+mgr.getRAModules(server).length+" RA modules");
J2EEDeployedObject[] deployments = mgr.getDeployedObjects(server);
for (int i = 0; i < deployments.length; i++) {
J2EEDeployedObject deployment = deployments[i];
System.out.println("Deployment "+i+": "+deployment.getObjectName());
}
J2EEApplication[] applications = mgr.getApplications(server);
for (int i = 0; i < applications.length; i++) {
J2EEApplication app = applications[i];
System.out.println("Application "+i+": "+app.getObjectName());
J2EEModule[] modules = mgr.getModules(app);
for (int j = 0; j < modules.length; j++) {
J2EEModule deployment = modules[j];
System.out.println(" Module "+j+": "+deployment.getObjectName());
}
}
} catch (IOException e) {
e.printStackTrace();
}