FileDocCategorySizeDatePackage
SystemAppLoader.javaAPI DocGlassfish v2 API5057Fri May 04 22:35:48 BST 2007com.sun.enterprise.server.ondemand

SystemAppLoader

public class SystemAppLoader extends Object
System apps are loaded by this class. ServiceGroups use this class to load system apps that belong to them
author
Binod PG
see
ServiceGroup

Fields Summary
private Hashtable
apps
private ApplicationManager
appsMgr
private StandAloneEJBModulesManager
ejbMgr
static Logger
_logger
final Object[]
ejbSGApps
final Object[]
webSGApps
Constructors Summary
public SystemAppLoader()
Constructs a datastructure that holds all system app info.

  
                  
        

        for (int i=0; i < ejbSGApps.length; i++) {
            apps.put(ejbSGApps[i][0], ejbSGApps[i][1]);
        }

        /** Web container is started by default. So, dont 
            control these system apps
        for (int i=0; i < webSGApps.length; i++) {
            apps.put(webSGApps[i][0], webSGApps[i][1]);
        }
        */
    
Methods Summary
private java.util.ArrayListcreateArrayList(java.lang.Object[][] objArray)

        ArrayList list = new ArrayList();
        for (int i=0; i < objArray.length; i ++) {
            list.add(objArray[i][0]);
        }       
        return list;
    
public java.util.ArrayListgetEjbServiceGroupSystemApps()

        return createArrayList(ejbSGApps);
    
public java.util.ArrayListgetResourcesServiceGroupSystemApps()

        return null;
    
public java.util.ArrayListgetWebServiceGroupSystemApps()

        return createArrayList(webSGApps);
    
public booleanisOnDemandSystemApp(java.lang.String id)

        return apps.containsKey(id);
    
public voidloadSystemApps(java.util.ArrayList ids)

        Iterator it = ids.iterator();
        while (it.hasNext()) {
            Object appName = it.next();
            if (_logger.isLoggable(Level.INFO)) {
                _logger.log(Level.INFO, "About to load the system app: " + appName);
            }
            if (apps.containsKey(appName)) {
                AbstractManager mgr = (AbstractManager) apps.get(appName);           
                mgr.loadOneSystemApp((String) appName, true);
            }
        }