FileDocCategorySizeDatePackage
J2EEModuleUtil.javaAPI DocGlassfish v2 API3250Fri May 04 22:25:46 BST 2007com.sun.enterprise.management.util

J2EEModuleUtil

public class J2EEModuleUtil extends Object

Fields Summary
Constructors Summary
Methods Summary
public static java.util.SetfindNames(java.lang.String keys)

        Set s = new HashSet();
        ObjectName namepattern = null;
        try {
            String pattern = getDomainName() + ":" + keys + ",*";
            namepattern = new ObjectName(pattern);
        }
        catch(Exception e) {
            e.printStackTrace();
        }
        if(namepattern != null)  {
            MEJBUtility mejb = MEJBUtility.getMEJBUtility();
            if(mejb != null)
                try {
                    s = mejb.queryNames(namepattern, null);
                }
                catch(Exception e) {
                    e.printStackTrace();
                }
        }
        return s;
    
public static java.lang.StringgetDomainName()

        return "com.sun.appserv";
    
public static java.lang.String[]getjavaVMs()

        Set x = findNames("j2eeType=JVM");
        Iterator it = x.iterator();
        String vms[] = new String[x.size()];
        int i = 0;
        while(it.hasNext()) 
            vms[i++] = ((ObjectName)it.next()).toString();
        return vms;