FileDocCategorySizeDatePackage
ConfigsMBean.javaAPI DocGlassfish v2 API72368Fri May 04 22:24:08 BST 2007com.sun.enterprise.admin.mbeans

ConfigsMBean

public class ConfigsMBean extends com.sun.enterprise.admin.config.BaseConfigMBean implements com.sun.enterprise.admin.mbeanapi.IConfigsMBean

Fields Summary
public static final String
DEFAULT_HTTP_LISTENER_ACCEPTOR_THREADS
Default http-acceptor-threads for PE.
private static final com.sun.enterprise.admin.target.TargetType[]
VALID_CREATE_DELETE_TYPES
Valid targets for the configuration mbeans are 1) a named configuration, 2) a named server instance 3) a named cluster FIXTHIS: This needs to be made pluggable.
private static final com.sun.enterprise.admin.target.TargetType[]
VALID_LIST_TYPES
private static final com.sun.enterprise.util.i18n.StringManager
localStrings
i18n strings manager object
static final String
FILE_REALM_CLASSNAME
static final String
KEYFILE_PATH_PROPERTY_NAME
static final String
PROVIDER_TYPE_SERVER
static final String
PROVIDER_TYPE_CLIENT
Constructors Summary
public ConfigsMBean()


         
     
    
        super();
    
Methods Summary
private voidaddMandatoryVirtualServerProperties(javax.management.AttributeList al, java.util.Properties p)
Adds the properties while creating the virtual server. This method is required because of the bug 4963449. Once the dtd is modified, we may not use this method and its call.

Date: Dec 09, 2003

        setProperty(p, false, SystemPropertyConstants.ACCESSLOG_PROPERTY,
                    SystemPropertyConstants.getAccessLogDefaultValue());
        final String ca = 
            AttributeListUtils.toJmx12Attribute(ServerTags.DEFAULT_WEB_MODULE);
        if (! AttributeListUtils.
              containsNamedAttribute(al, ca))
        {
            setProperty(p, false, SystemPropertyConstants.DOCROOT_PROPERTY,
                      SystemPropertyConstants.getDocRootDefaultValue());
        }
        else
        {
            final Attribute defaultWb = 
                (Attribute)AttributeListUtils.asNameMap(al).get(ca);
            final String val = (String)defaultWb.getValue();
            if ((val == null) || "".equals(val))
            {
                setProperty(p, false, SystemPropertyConstants.DOCROOT_PROPERTY,
                      SystemPropertyConstants.getDocRootDefaultValue());
            }
        }
    
public voidaddUser(java.lang.String user, java.lang.String password, java.lang.String[] grps, java.lang.String realmName, java.lang.String targetName)

        final Target target = getTarget(targetName);  
        check1ToN(target);
        realmName = (realmName != null) ? 
                    realmName : getDefaultAuthRealm(target);
        final ObjectName authRealm = getAuthRealmMBean(target, realmName);
        invokeN(authRealm, "addUser", new Object[] {user, password, grps}, 
                new String[] {String.class.getName(), String.class.getName(), 
                              new String[0].getClass().getName()});
    
private voidassertIt(boolean b, java.lang.Object msg)

        if (!b)
        {
            throw MBeanExceptionFormatter.toMBeanException(
                    null, msg.toString());
        }
    
voidcheck1ToN(com.sun.enterprise.admin.target.Target target)

         /*
         * Assumption: A domain should not have an associated config.
         * Calling getConfigTarget() on a DomainTarget must raise an
         * exception.
         */
         /* XXX QQ. Comment out to build.  FIXME
        boolean is1ToN = false;
        try
        {
            final ConfigTarget ct = target.getConfigTarget();
            is1ToN = ct.is1ToN(target);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        if (is1ToN)
        {
            throw MBeanExceptionFormatter.toMBeanException(null, 
                localStrings.getString("configsMBean.multiple_refs"));
        }
        */
    
private voidcheckAndCreateAuthRealmKeyFile(com.sun.enterprise.config.serverbeans.AuthRealm authRealm)

    
    //creates empty keyfile for file-realms if it's not exist
        
         
    
        if(!FILE_REALM_CLASSNAME.equals(authRealm.getClassname()))
            return; //only file realms have keyfile reference
        ElementProperty prop = authRealm.getElementPropertyByName(KEYFILE_PATH_PROPERTY_NAME);
        if(prop==null)
        {
//            String msg = localStrings.getString("configsMBean.no_keyfile_name_property");
//            _sLogger.log(Level.WARNING, msg);
//            throw new MBeanConfigException(msg);
            return; //leave validation exception to config validator 
        }
        String path=null;
        try 
        {
                path = resolveTokensForDas(prop.getValue());
                // this is patch for file-realm only
                // we need to create empty keyfile if it's not exist
                File file;
                if((file = new File(path))!=null && !file.exists())
                        file.createNewFile();
        }
        catch (Exception e)
        {
            String msg = localStrings.getString("configsMBean.can_not_create_keyfile", new Object[]{path});
            _sLogger.log(Level.WARNING, msg);
            throw new MBeanConfigException(msg);
        }
    
private voidcheckElementDoesnotExist(javax.management.ObjectName targetON, java.lang.String getter, java.lang.Object msg)

       ObjectName on = null;
       try
       {
           on = (ObjectName)invoke0(targetON, getter);
       }
       catch (MBeanException mbe)
       {
           //log??
       }
       if (on != null)
       {
           throw MBeanExceptionFormatter.toMBeanException(
               null, msg.toString());
       }
    
private com.sun.enterprise.config.serverbeans.ElementProperty[]convertPropertiesToElementProperties(java.util.Properties props)

        ArrayList list = new ArrayList();
        Enumeration keys = props.keys();
        while (keys.hasMoreElements())
        {
            final String key = (String)keys.nextElement();
            ElementProperty property = new ElementProperty();
            property.setName(key);
            property.setValue((String)props.get(key));
            list.add(property);
        }
        return (ElementProperty[])list.toArray(new ElementProperty[list.size()]);
    
private java.util.PropertiescopyProperties(java.util.Properties p)
Always returns a non null instance of {@link java.util.Properties}. Following rules apply:
  • If the passed argument is null a non null empty Properties instance is returned.
  • All property mappings from the passed argument are copied "as-is" to the new Properties instance, that is returned.
    • Note that the constructor {@link Properties#Properties} is not useful for this purpose.

              final Properties nn = new Properties();
              if (p != null)
              {
                  final Enumeration e = p.propertyNames();
                  while (e.hasMoreElements())
                  {
                      final String key    = (String)e.nextElement();
                      final String value  = p.getProperty(key);
                      nn.setProperty(key, value);
                  }
              }
              return ( nn );
          
public javax.management.ObjectNamecreateAuditModule(javax.management.AttributeList attrs, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName securityService = getSecurityServiceMBean(target);
        final ObjectName on = (ObjectName)invoke1(securityService, 
            "createAuditModule", attrs, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateAuthRealm(javax.management.AttributeList attrs, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        
        //first, create standalone auth-realm
        Config config = getConfigBeanForTarget(target);
        SecurityService secService = config.getSecurityService();
        ManagedConfigBean mcbSecService = getManagedConfigBean(secService);
        AuthRealm authRealm = (AuthRealm)mcbSecService.createChildByType(
                ServerTags.AUTH_REALM, attrs, props);
        
        // Second, check keyfile
        // we need to create empty keyfile if it's not exist
        //   file should exist already - synchronization problems???
        checkAndCreateAuthRealmKeyFile(authRealm); 
        
        
        // Finally, add auth-realm o config context
        mcbSecService.addChildBean(ServerTags.AUTH_REALM, authRealm, false);
        return getConfigBeanObjectName(authRealm);
    
public javax.management.ObjectNamecreateEjbTimerService(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final ObjectName ejbContainer = getEjbContainer(targetName);
        final ObjectName on = (ObjectName)invoke1(ejbContainer, 
            "createEjbTimerService", al, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateHttpListener(javax.management.AttributeList attrList, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);     
        check1ToN(target);

        //set the default acceptor threads if not specified in attrList
        if(!ConfigMBeanUtil.attributeDefinedInList(attrList,
                ServerTags.ACCEPTOR_THREADS)) {
           attrList.add(new Attribute(ServerTags.ACCEPTOR_THREADS,
                getDefaultHTTPListenerAcceptorThreads()));
        }


        ObjectName httpService = getHttpServiceMBean(target);
        ObjectName mbean = (ObjectName)invoke1(httpService, 
            "createHttpListener", attrList, AttributeList.class.getName());
        setProperties(mbean, props);
        //4954870
        try
        {
            HttpListenerVirtualServerAssociationMgr mgr = 
                new HttpListenerVirtualServerAssociationMgr(getConfigContext(), 
                    target.getConfigRef());
            mgr.addHttpListenerRef(mbean.getKeyProperty("id"));
        }
        catch (ConfigException ce)
        {
            throw MBeanExceptionFormatter.toMBeanException(ce, null);
        }
        //4954870
        return mbean;
    
public javax.management.ObjectNamecreateIiopListener(javax.management.AttributeList attrList, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);     
        check1ToN(target);
        ObjectName iiopService = getIiopServiceMBean(target);
        ObjectName mbean = (ObjectName)invoke1(iiopService, 
            "createIiopListener", attrList, AttributeList.class.getName());
        setProperties(mbean, props);
        return mbean;
    
public javax.management.ObjectNamecreateJaccProvider(javax.management.AttributeList attrs, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName securityService = getSecurityServiceMBean(target);
        final ObjectName jaccProvider = (ObjectName)invoke1(securityService, 
            "createJaccProvider", attrs, AttributeList.class.getName());
        setProperties(jaccProvider, props);
        return jaccProvider;
    
public javax.management.ObjectNamecreateJmsHost(javax.management.AttributeList attrs, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName jmsService = getJmsServiceMBean(target, true);
        final ObjectName jmsHost = (ObjectName)invoke1(jmsService, 
            "createJmsHost", attrs, AttributeList.class.getName());
        setProperties(jmsHost, props);
        return jmsHost;
    
public java.lang.String[]createJvmOptions(java.lang.String[] options, boolean isProfiler, java.lang.String targetName)
Adds the given jvm options to the existing set of jvm options. Excludes the jvm options that already exist.

param
options jvm options to be added.
param
isProfiler jvm-options can be added either to the java config element or to the profiler element.
param
targetName
return
Returns an array of jvm options that could not be added. This array will be atleast of 0 length so that callers donot have to check for null. A non zero length indicates that some of the specified options could not be added successfully.
throws
MBeanException
throws
IllegalArgumentException if the options argument is null.
throws
InvalidJvmOptionException

 
        if (null == options)
        {
            throw new IllegalArgumentException(
                localStrings.getString("configsMBean.null_jvm_options"));
        }
        final Target target = getTarget(targetName);
        quoteOptionsWithSpaces(options);
        check1ToN(target);
        final String[] oldOptions = getJvmOptions(isProfiler, target);
        final JvmOptionsHelper jvmOptions = new JvmOptionsHelper(oldOptions);
        final String[] invalid = jvmOptions.addJvmOptions(options);
        final ObjectName targetON = getJvmOptionsTargetObjectName(
                                        target, isProfiler);
        setAttribute0(targetON, "jvm_options", jvmOptions.getJvmOptionsAsStoredInXml());
        postInvoke("createJvmOptions", null);

        return invalid;
    
public javax.management.ObjectNamecreateManagerProperties(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName sessionManager = getSessionManagerMBean(target, true);
        final ObjectName on = (ObjectName)invoke1(sessionManager, 
            "createManagerProperties", al, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateMessageSecurityProvider(java.lang.String messageLayer, java.lang.String providerId, java.lang.String providerType, java.lang.String providerClassName, java.lang.String requestAuthSource, java.lang.String requestAuthRecipient, java.lang.String responseAuthSource, java.lang.String responseAuthRecipient, boolean isDefaultProvider, java.util.Properties props, java.lang.String targetName)


    //**********************************************************************
    //message-security
    /*
     * Creates the message-security-config and provider-config sub elements 
     * for the security-service. 
     * If the message-layer doesnt exist a new subelement for message-security-config 
     * is created and then the provider-config is created under it. 
     */
      
              // auth-layer attribute of message-security-config

                 // provider id
               // "client"/"server"/"client-server"
          // The class-name of java class  of the provider. 
       
             // requirement for message layer sender authentication (can be null)
          // requirement for message layer receiver  authentication (can be null)
 
             // requirement for message layer sender authentication (can be null)
          // requirement for message layer receiver  authentication (can be null)
        
             // set pro
                      //provider's properties 
                      // target name (config, instance, cluster, or 'server')
        
         
    
        final Target target = getTarget(targetName);
        check1ToN(target);
        final ConfigTarget configTarget = target.getConfigTarget();
        boolean bMessageConfigJustCreated = false;
        Config config = ConfigAPIHelper.getConfigByName(getConfigContext(), configTarget.getName());
        SecurityService securityService = config.getSecurityService();
        
        //message-security-config
        MessageSecurityConfig messageSecurity = securityService.getMessageSecurityConfigByAuthLayer(messageLayer);
        if(messageSecurity==null)
        {
          // we have to create it 
           messageSecurity = new MessageSecurityConfig();
           messageSecurity.setAuthLayer(messageLayer);
           bMessageConfigJustCreated = true;
        }
        
        //provider-config
        ProviderConfig provider = new ProviderConfig();
        provider.setClassName(providerClassName);
        provider.setProviderId(providerId);
        provider.setProviderType(providerType);
        
        //properties
        if (null != props)
        {
            provider.setElementProperty(convertPropertiesToElementProperties(props));
        }

        //request-policy
        if(requestAuthSource!=null || requestAuthRecipient!=null )
        {
            RequestPolicy requestPolicy = new RequestPolicy();
            if(requestAuthSource!=null)
                requestPolicy.setAuthSource(requestAuthSource);
            if(requestAuthRecipient!=null)
                requestPolicy.setAuthRecipient(requestAuthRecipient);
            provider.setRequestPolicy(requestPolicy);
        }

        //response-policy
        if(responseAuthSource!=null || responseAuthRecipient!=null )
        {
            ResponsePolicy responsePolicy = new ResponsePolicy();
            if(responseAuthSource!=null)
                responsePolicy.setAuthSource(responseAuthSource);
            if(responseAuthRecipient!=null)
                responsePolicy.setAuthRecipient(responseAuthRecipient);
            provider.setResponsePolicy(responsePolicy);
        }

        messageSecurity.addProviderConfig(provider);
        //set default provider
        if(isDefaultProvider)
        {
            if(PROVIDER_TYPE_SERVER.equals(providerType))
                messageSecurity.setDefaultProvider(providerId);
            else if(PROVIDER_TYPE_CLIENT.equals(providerType))
                messageSecurity.setDefaultClientProvider(providerId);
            else 
            {
                messageSecurity.setDefaultProvider(providerId);
                messageSecurity.setDefaultClientProvider(providerId);
            }
        }
        if(bMessageConfigJustCreated)
        {
            securityService.addMessageSecurityConfig(messageSecurity);
        }
        
        return getMBeanRegistry().getMbeanObjectName("provider-config", 
                   new String[]{getDomainName(), configTarget.getName(), messageLayer, providerId});
    
public javax.management.ObjectNamecreateProfiler(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName); 
        check1ToN(target);
        final ObjectName javaConfig = getJavaConfigMBean(target);
        checkElementDoesnotExist(javaConfig, "getProfiler", 
            localStrings.getString("configsMBean.profiler_exists"));
        final ObjectName on = (ObjectName)invoke1(javaConfig, 
            "createProfiler", al, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateSessionProperties(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName sessionConfig = getSessionConfigMBean(target, true);
        final ObjectName on = (ObjectName)invoke1(sessionConfig, 
            "createSessionProperties", al, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateSsl(javax.management.AttributeList al, java.lang.String id, java.lang.String type, java.lang.String targetName)

        final Target target = getTarget(targetName);        
        check1ToN(target);
        ObjectName targetON = getSslTargetObjectName(target, id, type);
        if ("iiop-service".equals(type))
        {
            Config config = getConfigBeanForTarget(target);
            IiopService iiopService = config.getIiopService();
            SslClientConfig sslCfg = new SslClientConfig();
            sslCfg.setXPath(sslCfg.getAbsoluteXPath(iiopService.getXPath()));
            ManagedConfigBean mb = new ManagedConfigBean(
                    (ConfigBean)sslCfg, m_registry, getDomainName());
            mb.createChildByType("ssl", al, null, true);
            iiopService.setSslClientConfig(sslCfg);
            return (ObjectName)ConfigMBeanHelper.getConfigBeanObjectName(
                    m_registry, 
                    getDomainName(), sslCfg.getSsl());
        }
        checkElementDoesnotExist(targetON, "getSsl", 
            localStrings.getString("configsMBean.ssl_exists"));
        ObjectName ret = (ObjectName)invoke1(targetON, "createSsl", al, 
                                    AttributeList.class.getName());
        return ret;
    
private javax.management.ObjectNamecreateSslClientConfig(javax.management.ObjectName iiopService)

        ObjectName ret = (ObjectName)invoke1(iiopService, 
                            "createSslClientConfig", null, 
                            AttributeList.class.getName());
        return ret;
    
public javax.management.ObjectNamecreateStoreProperties(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName sessionManager = getSessionManagerMBean(target, true);
        final ObjectName on = (ObjectName)invoke1(sessionManager, 
            "createStoreProperties", al, AttributeList.class.getName());
        setProperties(on, props);
        return on;
    
public javax.management.ObjectNamecreateThreadPool(javax.management.AttributeList attrs, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName threadPools = getThreadPoolsMBean(target);
        final ObjectName threadPool = (ObjectName)invoke1(threadPools, 
            "createThreadPool", attrs, AttributeList.class.getName());
        setProperties(threadPool, props);
        return threadPool;
    
public javax.management.ObjectNamecreateVirtualServer(javax.management.AttributeList al, java.util.Properties props, java.lang.String targetName)

        final Target target = getTarget(targetName);       
        check1ToN(target);
        ObjectName httpService = getHttpServiceMBean(target);
        ObjectName mbean = (ObjectName)invoke1(httpService, 
            "createVirtualServer", al, AttributeList.class.getName());
        final Properties nProps = copyProperties(props);
        addMandatoryVirtualServerProperties(al, nProps); //"optional properties"
        setProperties(mbean, nProps);
        return mbean;
    
public booleandeleteAuditModule(java.lang.String name, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName securityService = getSecurityServiceMBean(target);
        invoke1(securityService, "removeAuditModuleByName", name, 
                String.class.getName());
        return true;
    
public booleandeleteAuthRealm(java.lang.String name, java.lang.String targetName)

        final Target target = getTarget(targetName);       
        check1ToN(target);
        final ObjectName securityService = getSecurityServiceMBean(target);
        invoke1(securityService, "removeAuthRealmByName", name, 
                String.class.getName());
        return true;
    
public booleandeleteEjbTimerService(java.lang.String targetName)

        final ObjectName ejbContainer = getEjbContainer(targetName);
        invoke0(ejbContainer, "removeEjbTimerService");
        return true;
    
public booleandeleteHttpListener(java.lang.String listenerId, java.lang.String targetName)

        final Target target = getTarget(targetName);
        //4954870
        try
        {
            HttpListenerVirtualServerAssociationMgr mgr = 
                new HttpListenerVirtualServerAssociationMgr(getConfigContext(), 
                    target.getConfigRef());
            mgr.deleteHttpListenerRef(listenerId);
        }
        catch (ConfigException ce)
        {
            throw MBeanExceptionFormatter.toMBeanException(ce, null);
        }
        //4954870
        check1ToN(target);        
        final ObjectName httpService = getHttpServiceMBean(target);
        invoke1(httpService, "removeHttpListenerById", listenerId, 
                String.class.getName());
        return true;
    
public booleandeleteIiopListener(java.lang.String listenerId, java.lang.String targetName)

        final Target target = getTarget(targetName); 
        check1ToN(target);
        final ObjectName iiopService = getIiopServiceMBean(target);
        invoke1(iiopService, "removeIiopListenerById", listenerId, 
                String.class.getName());
        return true;
    
public booleandeleteJaccProvider(java.lang.String name, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName securityService = getSecurityServiceMBean(target);
        invoke1(securityService, "removeJaccProviderByName", name, 
                String.class.getName());
        return true;
    
public booleandeleteJmsHost(java.lang.String name, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName jmsService = getJmsServiceMBean(target, false);
        assertIt((jmsService != null), 
            localStrings.getString("configsMBean.no_jms_service"));

	//START_BUG_FIX: 6178076
	if(name.equals(getAttribute0(jmsService, "default_jms_host"))) {
	    // set it to null since the jms host is being deleted.
	    // runtime has default anyway.
	    setAttribute0(jmsService, "default_jms_host", null);	
            _sLogger.log(Level.FINE, 
		"default-jms-host attribute of jms-service for target " 
		+ targetName
		+ " has been set to null");
	}
	//END_BUG_FIX: 6178076

        invoke1(jmsService, "removeJmsHostByName", name, 
                String.class.getName());
        return true;
    
public java.lang.String[]deleteJvmOptions(java.lang.String[] options, boolean isProfiler, java.lang.String targetName)
Deletes the given jvm options from the existing set of jvm options.

param
options jvm options to be deleted.
param
isProfiler jvm-options can exist in either the java config element or the profiler element.
param
targetName
return
Returns an array of jvm options that could not be deleted. This array will be atleast of 0 length so that callers donot have to check for null. A non zero length indicates that some of the specified options could not be deleted successfully.
throws
MBeanException
throws
IllegalArgumentException if the options argument is null.

        if (null == options)
        {
            throw new IllegalArgumentException(
                localStrings.getString("configsMBean.null_jvm_options"));
        }
        quoteOptionsWithSpaces(options);
        final Target target = getTarget(targetName);
        check1ToN(target);
        final String[] oldOptions = getJvmOptions(isProfiler, target);
        final JvmOptionsHelper jvmOptions = new JvmOptionsHelper(oldOptions);
        final String[] invalid = jvmOptions.deleteJvmOptions(options);
        final ObjectName targetON = getJvmOptionsTargetObjectName(
                                        target, isProfiler);
        setAttribute0(targetON, "jvm_options", jvmOptions.getJvmOptionsAsStoredInXml());
        postInvoke("deleteJvmOptions", null);

        return invalid;
    
public booleandeleteManagerProperties(java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName sessionManager = getSessionManagerMBean(target, false);
        invoke0(sessionManager, "removeManagerProperties");
        return true;
    
public booleandeleteMessageSecurityProvider(java.lang.String messageLayer, java.lang.String providerId, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        Config config = ConfigAPIHelper.getConfigByName(getConfigContext(), 
                        target.getConfigTarget().getName());
        SecurityService securityService = config.getSecurityService();
        MessageSecurityConfig messageSecurity = 
            securityService.getMessageSecurityConfigByAuthLayer(messageLayer);
        if(messageSecurity==null)
        {
            String msg = localStrings.getString( "admin.mbeans.configs.message_security_config_not_found", 
                    new Object[]{messageLayer, targetName});
            throw new MBeanConfigException(msg);
        }
        ProviderConfig[] providers = messageSecurity.getProviderConfig();
        if(providers.length==1 && providerId.equals(providers[0].getProviderId()))
        {
            securityService.removeMessageSecurityConfig(messageSecurity);
            return true;
        }
        ProviderConfig provider = messageSecurity.getProviderConfigByProviderId(providerId);
        if(provider==null)
        {
            String msg = localStrings.getString( "admin.mbeans.configs.security_provider_not_found", new Object[]{providerId, messageLayer, targetName});
            throw new MBeanConfigException(msg);
        }
        messageSecurity.removeProviderConfig(provider);

        return true;
    
public booleandeleteProfiler(java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName javaConfig = getJavaConfigMBean(target);
        invoke0(javaConfig, "removeProfiler");
        return true;
    
public booleandeleteSessionConfig(java.lang.String targetName)

        final Target target = getTarget(targetName); 
        check1ToN(target);
        final ObjectName webContainer = getChild("web-container", null, target);
        invoke0(webContainer, "removeSessionConfig");
        return true;
    
public booleandeleteSessionProperties(java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName sessionConfig = getSessionConfigMBean(target, false);
        invoke0(sessionConfig, "removeSessionProperties");
        return true;
    
public booleandeleteSsl(java.lang.String id, java.lang.String type, java.lang.String targetName)

        final Target target = getTarget(targetName);   
        check1ToN(target);
        final ObjectName targetON = getSslTargetObjectName(target, id, type);
        final String opName = "iiop-service".equals(type) ?
            "removeSslClientConfig" : "removeSsl";
        invoke0(targetON, opName);
        return true;
    
public booleandeleteStoreProperties(java.lang.String targetName)

        final Target target = getTarget(targetName);   
        check1ToN(target);
        final ObjectName sessionManager = getSessionManagerMBean(target, false);
        invoke0(sessionManager, "removeStoreProperties");
        return true;
    
public booleandeleteThreadPool(java.lang.String threadPoolId, java.lang.String targetName)

        final Target target = getTarget(targetName);
        check1ToN(target);
        final ObjectName threadPools = getThreadPoolsMBean(target);
        invoke1(threadPools, "removeThreadPoolByThreadPoolId", 
            threadPoolId, String.class.getName());
        return true;
    
public booleandeleteVirtualServer(java.lang.String id, java.lang.String targetName)

        final Target target = getTarget(targetName);       
        check1ToN(target);
        final ObjectName httpService = (ObjectName)getHttpServiceMBean(target);
        invoke1(httpService, "removeVirtualServerById", id, 
                String.class.getName());
        return true;
    
private voiddoPersistenceCheck(com.sun.enterprise.admin.meta.naming.MBeanNamingInfo info, com.sun.enterprise.config.ConfigContext ctx)

        ConfigBean cb = null;
        try
        {
            final String xpath = info.getXPath();
            cb = ConfigBeansFactory.getConfigBeanByXPath(ctx, xpath);
            if (null == cb)
            {
                throw new InstanceNotFoundException(
                    localStrings.getString("configsMBean.mbean_not_found", 
                    info.getObjectName()));
            }
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
    
private java.lang.ObjectgetAttribute0(javax.management.ObjectName on, java.lang.String attrName)

        Object value = null;
        try
        {
            value = getMBeanServer().getAttribute(on, attrName);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return value;
    
public javax.management.ObjectNamegetAuditModule(java.lang.String name, java.lang.String targetName)

        return getChild("audit-module", new String[]{name}, targetName);
    
public javax.management.ObjectNamegetAuthRealm(java.lang.String name, java.lang.String targetName)

        return getChild("auth-realm", new String[]{name}, targetName);
    
protected javax.management.ObjectNamegetAuthRealmMBean(com.sun.enterprise.admin.target.Target target, java.lang.String name)

        final ObjectName securityService = getSecurityServiceMBean(target);
        final ObjectName authRealm = (ObjectName)invoke1(securityService, 
            "getAuthRealmByName", name, String.class.getName());
        assertIt((authRealm != null), localStrings.getString(
                                    "configsMBean.auth_realm_not_found", name));
        return authRealm;
    
public javax.management.ObjectNamegetChild(java.lang.String type, java.lang.String[] location, java.lang.String targetName)
A generic operation that returns the ObjectName of a child element given its type & parent's location. eg:- getChild("http-listener", new String[]{"http-listener-1"}, "server") getChild("ssl", new String[] {"http-listener-1"}, null); getChild("ejb-container", null, null);

type
The type of the child elemenet. The types are standardized for all the config elements that are exposed via config mbeans. Please read the mbean descriptor doc for a list of valid types.
location
an array of tokens that will be used to locate the parent. Please note that the order of the tokens is important in order to obtain the ObjectName of the parent mbean.
targetName
throws
MBeanException

        return getChild(type, location, getListTarget(targetName));
    
protected javax.management.ObjectNamegetChild(java.lang.String type, java.lang.String[] location, com.sun.enterprise.admin.target.Target target)

        final MBeanRegistryEntry entry = getMBeanRegistryEntry(type);
        final MBeanNamingInfo namingInfo = getMBeanNamingInfo(entry, type, 
                    getObjectNameTokens(target, location));
        doPersistenceCheck(namingInfo, getConfigContext());
        final ObjectName on = getObjectName(namingInfo);
        postInvoke("getChild", on);
        return on;
    
protected com.sun.enterprise.config.serverbeans.ConfiggetConfigBeanForTarget(com.sun.enterprise.admin.target.Target target)

        final ConfigTarget configTarget = target.getConfigTarget();
        return ConfigAPIHelper.getConfigByName(getConfigContext(), configTarget.getName());
    
protected javax.management.ObjectNamegetConfigMBean(com.sun.enterprise.admin.target.Target target)

        ObjectName configMBean = null;
        try
        {
            final ConfigTarget ct = target.getConfigTarget();
            configMBean = new ObjectName(ct.getTargetObjectName(
                                         new String[] {getDomainName()}));
            
            postInvoke("getConfigMBean", configMBean);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return configMBean;
    
public java.lang.StringgetConfigNameForTarget(java.lang.String targetName)
Resolve target name to associated config name.

param
targetName target name to resolve
returns
config name associated with given target

        final Target        target = getTarget(targetName);
        final ConfigTarget  configTarget = target.getConfigTarget();
        return configTarget.getName();
     
protected java.lang.StringgetConfigRef(com.sun.enterprise.admin.target.Target target)

        String configRef = null;
        try
        {
            configRef = target.getConfigRef();
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return configRef;
    
protected java.lang.StringgetDefaultAuthRealm(com.sun.enterprise.admin.target.Target target)

        final ObjectName on = getSecurityServiceMBean(target);
        return (String)getAttribute0(on, "default_realm");
    
protected java.lang.StringgetDefaultHTTPListenerAcceptorThreads()

        return DEFAULT_HTTP_LISTENER_ACCEPTOR_THREADS;
    
public javax.management.ObjectNamegetEjbContainer(java.lang.String targetName)

        return getChild("ejb-container", null, targetName);
    
public javax.management.ObjectNamegetEjbTimerService(java.lang.String targetName)

        return getChild("ejb-timer-service", null, targetName);
    
public java.lang.String[]getGroupNames(java.lang.String user, java.lang.String realmName, java.lang.String targetName)

        final Target target = getListTarget(targetName);
        realmName = (realmName != null) ? 
                    realmName : getDefaultAuthRealm(target);
        final ObjectName authRealm = getAuthRealmMBean(target, realmName);
        return (String[])invoke1(authRealm, "getUserGroupNames", 
                                user, String.class.getName());
    
public javax.management.ObjectNamegetHttpListener(java.lang.String id, java.lang.String targetName)

        return getChild("http-listener", new String[]{id}, targetName);
    
protected javax.management.ObjectNamegetHttpListenerMBean(com.sun.enterprise.admin.target.Target target, java.lang.String id)

        return (ObjectName)invoke1(getHttpServiceMBean(target), 
            "getHttpListenerById", id, String.class.getName());
    
public javax.management.ObjectNamegetHttpService(java.lang.String targetName)

        return getChild("http-service", null, targetName);
    
protected javax.management.ObjectNamegetHttpServiceMBean(com.sun.enterprise.admin.target.Target target)

        final ObjectName configMBean = getConfigMBean(target);
        ObjectName ret = (ObjectName)invoke0(configMBean, "getHttpService");
        return ret;
    
public javax.management.ObjectNamegetIiopListener(java.lang.String id, java.lang.String targetName)

        return getChild("iiop-listener", new String[]{id}, targetName);
    
protected javax.management.ObjectNamegetIiopListenerMBean(com.sun.enterprise.admin.target.Target target, java.lang.String id)

        return (ObjectName)invoke1(getIiopServiceMBean(target), 
            "getIiopListenerById", id, String.class.getName());
    
public javax.management.ObjectNamegetIiopService(java.lang.String targetName)

        return getChild("iiop-service", null, targetName);
    
protected javax.management.ObjectNamegetIiopServiceMBean(com.sun.enterprise.admin.target.Target target)

        final ObjectName configMBean = getConfigMBean(target);
        ObjectName ret = (ObjectName)invoke0(configMBean, "getIiopService");
        return ret;
    
public javax.management.ObjectNamegetJaccProvider(java.lang.String name, java.lang.String targetName)

        return getChild("jacc-provider", new String[]{name}, targetName);
    
public javax.management.ObjectNamegetJavaConfig(java.lang.String targetName)

        return getChild("java-config", null, targetName);
    
protected javax.management.ObjectNamegetJavaConfigMBean(com.sun.enterprise.admin.target.Target target)

        final ObjectName configMBean = getConfigMBean(target);
        final ObjectName ret = (ObjectName)invoke0(
                                    configMBean, "getJavaConfig");
        assertIt((ret != null), 
            localStrings.getString("configsMBean.no_java_config"));
        return ret;
    
public javax.management.ObjectNamegetJmsHost(java.lang.String name, java.lang.String targetName)

        return getChild("jms-host", new String[]{name}, targetName);
    
public javax.management.ObjectNamegetJmsService(java.lang.String targetName)

        return getChild("jms-service", null, targetName);
    
protected javax.management.ObjectNamegetJmsServiceMBean(com.sun.enterprise.admin.target.Target target, boolean create)

        final ObjectName configMBean = getConfigMBean(target);
        ObjectName on = null;
        try
        {
            on = (ObjectName)invoke0(configMBean, "getJmsService");
        }
        catch (Exception e)
        {
            //log
        }
        if ((null == on) && create)
        {
            on = (ObjectName)invoke1(configMBean, 
                "createJmsService", null, AttributeList.class.getName());
        }
        return on;
    
protected java.lang.String[]getJvmOptions(boolean isProfiler, com.sun.enterprise.admin.target.Target target)

        final ObjectName targetON = getJvmOptionsTargetObjectName(
                                        target, isProfiler);
        String[] jvmOptions = (String[])getAttribute0(targetON, "jvm_options");
        if (null == jvmOptions) { jvmOptions = new String[0]; }
        return jvmOptions;
    
public java.lang.String[]getJvmOptions(boolean isProfiler, java.lang.String targetName)

        return getJvmOptions(isProfiler, getListTarget(targetName));
    
private javax.management.ObjectNamegetJvmOptionsTargetObjectName(com.sun.enterprise.admin.target.Target target, boolean isProfiler)

        ObjectName on = getJavaConfigMBean(target);
        if (isProfiler)
        {
            on = (ObjectName)invoke0(on, "getProfiler");
        }
        assertIt((on != null), localStrings.getString(
            "configsMBean.target_for_jvm_options_not_found"));
        return on;
    
com.sun.enterprise.admin.target.TargetgetListTarget(java.lang.String targetName)

        
        try
        {               
            return TargetBuilder.INSTANCE.createTarget(VALID_LIST_TYPES, targetName, 
                getConfigContext());            
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }        
    
public javax.management.ObjectNamegetLogService(java.lang.String targetName)

        return getChild("log-service", null, targetName);
    
private com.sun.enterprise.admin.meta.naming.MBeanNamingInfogetMBeanNamingInfo(com.sun.enterprise.admin.meta.MBeanRegistryEntry entry, java.lang.String type, java.lang.String[] loc)

        
        MBeanNamingInfo namingInfo = null;
        try
        {
            namingInfo = new MBeanNamingInfo(entry.getNamingDescriptor(), 
                            type, loc);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return namingInfo;
    
protected com.sun.enterprise.admin.meta.MBeanRegistrygetMBeanRegistry()

        assertIt((super.m_registry != null), 
            localStrings.getString("configsMBean.null_registry"));
        return super.m_registry;
    
private com.sun.enterprise.admin.meta.MBeanRegistryEntrygetMBeanRegistryEntry(java.lang.String type)

        
        MBeanRegistryEntry entry = null;
        try
        {
            entry = getMBeanRegistry().findMBeanRegistryEntryByType(type);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        assertIt((entry != null), 
            localStrings.getString("configsMBean.no_registry_entry", type));
        return entry;
    
protected javax.management.MBeanServergetMBeanServer()

        return com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer();
    
public javax.management.ObjectNamegetManagerProperties(java.lang.String targetName)

        return getChild("manager-properties", null, targetName);
    
public javax.management.ObjectNamegetMdbContainer(java.lang.String targetName)

        return getChild("mdb-container", null, targetName);
    
private javax.management.ObjectName[]getMessageSecurityProviders(com.sun.enterprise.config.serverbeans.MessageSecurityConfig messageSecurity)

        ProviderConfig[] providers = messageSecurity.getProviderConfig();
        return ConfigMBeanHelper.getConfigBeansObjectNames(
            this.getMBeanRegistry(), this.getDomainName(), providers);
    
public javax.management.ObjectNamegetModuleLogLevels(java.lang.String targetName)

        return getChild("module-log-levels", null, targetName);
    
public javax.management.ObjectNamegetModuleMonitoringLevels(java.lang.String targetName)

        return getChild("module-monitoring-levels", null, targetName);
    
public javax.management.ObjectNamegetMonitoringService(java.lang.String targetName)

        return getChild("monitoring-service", null, targetName);
    
private javax.management.ObjectNamegetObjectName(com.sun.enterprise.admin.meta.naming.MBeanNamingInfo info)

        ObjectName on = null;
        try
        {
            on = info.getObjectName();
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return on;
    
protected java.lang.String[]getObjectNameTokens(com.sun.enterprise.admin.target.Target target, java.lang.String[] location)

        if (null == location) { location = new String[0]; }
        final String[] onTokens = new String[location.length + 2];
        onTokens[0] = getDomainName();
        onTokens[1] = getConfigRef(target);
        for (int i = 0; i < location.length; i++)
        {
            onTokens[i+2] = location[i];
        }
        return onTokens;
    
public javax.management.ObjectNamegetOrb(java.lang.String targetName)

        return getChild("orb", null, targetName);
    
public javax.management.ObjectNamegetProfiler(java.lang.String targetName)

        return getChild("profiler", null, targetName);
    
private java.lang.ObjectgetPropertyValue0(javax.management.ObjectName on, java.lang.String propName)

        Object value = null;
        try
        {
            value = invoke1(on, "getPropertyValue", propName, "java.lang.String");
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return value;
    
public javax.management.ObjectNamegetSecurityService(java.lang.String targetName)

        return getChild("security-service", null, targetName);
    
protected javax.management.ObjectNamegetSecurityServiceMBean(com.sun.enterprise.admin.target.Target target)

        final ObjectName configMBean = getConfigMBean(target);
        ObjectName ret = (ObjectName)invoke0(configMBean, "getSecurityService");
        return ret;
    
protected javax.management.ObjectNamegetSessionConfigMBean(com.sun.enterprise.admin.target.Target target, boolean create)

        ObjectName sessionConfig = null;
        try
        {
            sessionConfig = getChild("session-config", null, target);
        }
        catch (MBeanException mbe)
        {
            if (create)
            {
                //Create it
                final ObjectName webContainer = 
                    getChild("web-container", null, target);
                sessionConfig = (ObjectName)invoke1(webContainer, 
                    "createSessionConfig", null, AttributeList.class.getName());
            }
            else
            {
                throw mbe;
            }
        }
        return sessionConfig;
    
protected javax.management.ObjectNamegetSessionManagerMBean(com.sun.enterprise.admin.target.Target target, boolean create)

        final ObjectName sessionConfig = getSessionConfigMBean(target, create);
        ObjectName sessionManager = null;
        try
        {
            sessionManager = getChild("session-manager", null, target);
        }
        catch (MBeanException mbe)
        {
            if (create)
            {
                //Create it
                sessionManager = (ObjectName)invoke1(sessionConfig, 
                   "createSessionManager", null, AttributeList.class.getName());
            }
            else
            {
                throw mbe;
            }
        }
        return sessionManager;
    
public javax.management.ObjectNamegetSessionProperties(java.lang.String targetName)

        return getChild("session-properties", null, targetName);
    
public javax.management.ObjectNamegetSsl(java.lang.String type, java.lang.String id, java.lang.String targetName)

        final Target target = getListTarget(targetName);
        ObjectName sslTarget = getSslTargetObjectName(target, id, type);
        if ("iiop-service".equals(type))
        {
            sslTarget = (ObjectName)invoke0(sslTarget, "getSslClientConfig");
        }
        return (ObjectName)invoke0(sslTarget, "getSsl");
    
protected javax.management.ObjectNamegetSslTargetObjectName(com.sun.enterprise.admin.target.Target target, java.lang.String id, java.lang.String type)

        ObjectName on = null;
        if ("http-listener".equals(type))
        {
            on = getHttpListenerMBean(target, id);
        }
        else if ("iiop-listener".equals(type))
        {
            on = getIiopListenerMBean(target, id);
        }
        else if ("iiop-service".equals(type))
        {
            on = getIiopServiceMBean(target);
        }
        else
        {
            throw MBeanExceptionFormatter.toMBeanException(null, 
                localStrings.getString("configsMBean.invalid_ssl_target_type", 
                                       type));
        }
        assertIt((on != null), 
            localStrings.getString("configsMBean.target_for_ssl_not_found"));
        return on;
    
public javax.management.ObjectNamegetStoreProperties(java.lang.String targetName)

        return getChild("store-properties", null, targetName);
    
com.sun.enterprise.admin.target.TargetgetTarget(java.lang.String targetName)

        
        try
        {               
            Target target = TargetBuilder.INSTANCE.createTarget(VALID_CREATE_DELETE_TYPES, targetName, 
                getConfigContext());
            if (target.getType() == TargetType.SERVER || 
                target.getType() == TargetType.DAS) {
                //If we are operating on a server, ensure that the server is the only entity 
                //referencing its config
                String configName = ServerHelper.getConfigForServer(getConfigContext(),
                    target.getName()).getName();
                if (!ConfigAPIHelper.isConfigurationReferencedByServerOnly(getConfigContext(), 
                    configName, target.getName())) {
                        throw new ConfigException(localStrings.getString(
                            "configurationHasMultipleRefs", target.getName(), configName, 
                            ConfigAPIHelper.getConfigurationReferenceesAsString(
                                getConfigContext(), configName)));   
                }                                              
            } else if (target.getType() == TargetType.CLUSTER) {
                //If we are operating on a cluster, ensure that the cluster is the only entity 
                //referencing its config
                String configName = ClusterHelper.getConfigForCluster(getConfigContext(), 
                    target.getName()).getName();
                if (!ConfigAPIHelper.isConfigurationReferencedByClusterOnly(getConfigContext(), 
                    configName, target.getName())) {
                        throw new ConfigException(localStrings.getString(
                            "configurationHasMultipleRefs", target.getName(), configName, 
                            ConfigAPIHelper.getConfigurationReferenceesAsString(
                                getConfigContext(), configName))); 
                }     
            }
            return target;
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }        
    
public javax.management.ObjectNamegetThreadPool(java.lang.String threadPoolId, java.lang.String targetName)

        return getChild("thread-pool", new String[] {threadPoolId}, targetName);
    
protected javax.management.ObjectNamegetThreadPoolsMBean(com.sun.enterprise.admin.target.Target target)

        final ObjectName configMBean = getConfigMBean(target);
        ObjectName ret = (ObjectName)invoke0(configMBean, "getThreadPools");
        return ret;
    
public javax.management.ObjectNamegetTransactionService(java.lang.String targetName)

        return getChild("transaction-service", null, targetName);
    
public java.lang.String[]getUserNames(java.lang.String realmName, java.lang.String targetName)

        final Target target = getListTarget(targetName);
        realmName = (realmName != null) ? 
                    realmName : getDefaultAuthRealm(target);
        final ObjectName authRealm = getAuthRealmMBean(target, realmName);
        return (String[])invoke0(authRealm, "getUserNames");
    
public javax.management.ObjectNamegetVirtualServer(java.lang.String id, java.lang.String targetName)

        return getChild("virtual-server", new String[]{id}, targetName);
    
public javax.management.ObjectNamegetWebContainer(java.lang.String targetName)

        return getChild("web-container", null, targetName);
    
private java.lang.Objectinvoke0(javax.management.ObjectName on, java.lang.String opName)

        return invokeN(on, opName, null, null);
    
private java.lang.Objectinvoke1(javax.management.ObjectName on, java.lang.String opName, java.lang.Object o, java.lang.String cls)

        return invokeN( on, opName, new Object[] {o}, new String[] {cls} );
    
private java.lang.ObjectinvokeN(javax.management.ObjectName on, java.lang.String opName, java.lang.Object[] params, java.lang.String[] signature)

        Object ret = null;
        try
        {
            ret = getMBeanServer().invoke(on, opName, params, signature);
            postInvoke(opName, ret);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
        return ret;
    
public javax.management.ObjectName[]listAuditModules(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        final ObjectName securityService = getSecurityServiceMBean(target);
        return (ObjectName[])invoke0(securityService, "getAuditModule");
    
public javax.management.ObjectName[]listAuthRealms(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        ObjectName securityService = getSecurityServiceMBean(target);
        ObjectName[] ret = (ObjectName[])invoke0(securityService, 
                                                 "getAuthRealm");
        return ret;
    
public javax.management.ObjectName[]listHttpListeners(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        ObjectName httpService = getHttpServiceMBean(target);
        ObjectName[] ret = (ObjectName[])invoke0(httpService, 
                                                 "getHttpListener");
        return ret;
    
public javax.management.ObjectName[]listIiopListeners(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        ObjectName iiopService = getIiopServiceMBean(target);
        ObjectName[] ret = (ObjectName[])invoke0(iiopService, 
                                                 "getIiopListener");
        return ret;
    
public javax.management.ObjectName[]listJaccProviders(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        final ObjectName securityService = getSecurityServiceMBean(target);
        return (ObjectName[])invoke0(securityService, "getJaccProvider");
    
public javax.management.ObjectName[]listJmsHosts(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        final ObjectName jmsService = getJmsServiceMBean(target, false);
        assertIt((jmsService != null), 
            localStrings.getString("configsMBean.no_jms_service"));
        return (ObjectName[])invoke0(jmsService, "getJmsHost");
    
public javax.management.ObjectName[]listMessageSecurityProviders(java.lang.String messageLayer, java.lang.String targetName)

        final Target target = getListTarget(targetName);
        Config config = ConfigAPIHelper.getConfigByName(getConfigContext(), 
                        target.getConfigTarget().getName());
        SecurityService securityService = config.getSecurityService();
        if(securityService==null)
            return null;
        if(messageLayer!=null)
        {
            MessageSecurityConfig messageSecurity = 
                   securityService.getMessageSecurityConfigByAuthLayer(messageLayer); 
            if(messageSecurity==null)
            {
                String msg = localStrings.getString( "admin.mbeans.configs.message_security_config_not_found", 
                        new Object[]{messageLayer, targetName});
                throw new MBeanConfigException(msg);
            }
            return getMessageSecurityProviders(messageSecurity);
        }
        //here we are for null-messageLayer only
        MessageSecurityConfig[] messageSecurities = 
               securityService.getMessageSecurityConfig(); 
        ArrayList arr = new ArrayList();
        if(messageSecurities!=null)
            for(int i=0; i<messageSecurities.length; i++)
            {
                ObjectName[] names = getMessageSecurityProviders(messageSecurities[i]);
                if(names!=null)
                    for(int j=0; j<names.length; j++)
                        arr.add(names[j]);
            }
        return (ObjectName[])arr.toArray(new ObjectName[arr.size()]);    
    
public javax.management.ObjectName[]listThreadPools(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        final ObjectName threadPools = getThreadPoolsMBean(target);
        return (ObjectName[])invoke0(threadPools, "getThreadPool");
    
public javax.management.ObjectName[]listVirtualServers(java.lang.String targetName)

        final Target target = getListTarget(targetName);
        ObjectName httpService = getHttpServiceMBean(target);
        ObjectName[] ret = (ObjectName[])invoke0(httpService, 
                                                 "getVirtualServer");
        return ret;
    
protected voidpostInvoke(java.lang.String opName, java.lang.Object ret)

    
protected voidpreInvoke(java.lang.String opName, java.lang.Object[] params, java.lang.String[] signature)

    
private voidquoteOptionsWithSpaces(java.lang.String[] options)

       for(int i=0; i<options.length; i++)
       {
           if(options[i].indexOf(' ")>=0 &&
              (!options[i].startsWith("\"") || !options[i].endsWith("\"")))
           {
               options[i] = "\"" + options[i] + "\"";
           }
       }
    
public voidremoveUser(java.lang.String user, java.lang.String realmName, java.lang.String targetName)

        final Target target = getTarget(targetName);  
        check1ToN(target);
        realmName = (realmName != null) ? 
                    realmName : getDefaultAuthRealm(target);
        final ObjectName authRealm = getAuthRealmMBean(target, realmName);
        invoke1(authRealm, "removeUser", user, String.class.getName());
    
private java.lang.StringresolveTokensForDas(java.lang.String value)

        String instanceName=MBeanRegistryFactory.getAdminContext().getServerName();
        PropertyResolver resolver = new PropertyResolver(getConfigContext(), instanceName);
        return resolver.resolve(value, true);
    
private voidsetAttribute0(javax.management.ObjectName on, java.lang.String attrName, java.lang.Object value)

        try
        {
            final Attribute attr = new Attribute(attrName, value);
            getMBeanServer().setAttribute(on, attr);
        }
        catch (Exception e)
        {
            throw MBeanExceptionFormatter.toMBeanException(e, null);
        }
    
private voidsetProperties(javax.management.ObjectName on, java.util.Properties props)

        if (null != props)
        {
            Enumeration keys = props.keys();
            while (keys.hasMoreElements())
            {
                final String key = (String)keys.nextElement();
                final Attribute property =  new Attribute(key, props.get(key));
                invoke1(on, "setProperty", property, Attribute.class.getName());
            }
        }
    
private voidsetProperty(java.util.Properties table, boolean force, java.lang.String name, java.lang.String value)

        if (force)
            table.setProperty(name, value);
        else
            if (! table.containsKey(name))
                table.setProperty(name, value);
    
public voidupdateUser(java.lang.String user, java.lang.String password, java.lang.String[] grps, java.lang.String realmName, java.lang.String targetName)

        final Target target = getTarget(targetName);  
        check1ToN(target);
        realmName = (realmName != null) ? 
                    realmName : getDefaultAuthRealm(target);
        final ObjectName authRealm = getAuthRealmMBean(target, realmName);
        invokeN(authRealm, "updateUser", new Object[] {user, password, grps}, 
                new String[] {String.class.getName(), String.class.getName(), 
                              new String[0].getClass().getName()});