FileDocCategorySizeDatePackage
ManagedJ2EEWebModule.javaAPI DocGlassfish v2 API4783Fri May 04 22:33:56 BST 2007com.sun.enterprise.admin.server.core.mbean.config

ManagedJ2EEWebModule

public class ManagedJ2EEWebModule extends ConfigMBeanBase
Represents a managed Web Module. This is a part of a deployed application. When a J2EE application is deployed, instances of this MBean are registered in the MBeanServer.

There will be as many instances of this MBean as there are Web Modules (per application).

ObjectName of this MBean is: ias:type=J2EEWebModule, AppName= , ModuleName=

Fields Summary
private static final String[]
MAPLIST
private static final String[]
ATTRIBUTES
private static final String[]
OPERATIONS
Constructors Summary
public ManagedJ2EEWebModule()
Default constructor sets MBean description tables


    
                     
       
    
        this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS);
    
public ManagedJ2EEWebModule(String instanceName, String applicationName, String moduleName)

        this(); //set description tables
        initialize(ObjectNames.kWebModule, new String[]{instanceName, applicationName, moduleName});

    
Methods Summary
public java.lang.String[]getJSPPages()

        return ( null );
    
public intgetModuleType()

		return (  AdminConstants.kTypeWebModule );
	
public java.lang.String[]getServlets()

        ConfigMBeanNamingInfo namingInfo = this.getConfigMBeanNamingInfo();
        String [] locParams = namingInfo.getLocationParams();
        String applicationName = locParams[1];
        String moduleName      = locParams[2];

        try
        {
            J2eeApplication app = (J2eeApplication) this.getConfigBeanByXPath(ServerXPathHelper.getAppIdXpathExpression(applicationName));
            String location = app.getLocation();
            return ModulesXMLHelper.getServletsForWebModule(location, moduleName);
        }
        catch (Exception e)
        {
            sLogger.throwing(getClass().getName(), "getServlets", e);
            throw new J2EEWebModuleException(e.getMessage());
        }