Search in sources :

Example 6 with DomainConfig

use of com.sun.appserv.management.config.DomainConfig in project Payara by payara.

the class DomainConfigTest method testGetDeployedItemProxiesByName.

public void testGetDeployedItemProxiesByName() {
    final DomainConfig mgr = getDomainConfig();
    final Map<String, Map<String, AMX>> typeMap = mgr.getMultiContaineeMap(null);
    for (final String j2eeType : typeMap.keySet()) {
        final Map<String, AMX> proxyMap = typeMap.get(j2eeType);
        for (final String name : proxyMap.keySet()) {
            final AMX amx = Util.asAMX(proxyMap.get(name));
            final AMX proxy = mgr.getContainee(j2eeType, name);
            assert (Util.getObjectName(proxy).equals(Util.getObjectName(amx)));
            assert (proxy.getName().equals(name));
        }
    }
}
Also used : AMX(com.sun.appserv.management.base.AMX) Map(java.util.Map) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 7 with DomainConfig

use of com.sun.appserv.management.config.DomainConfig in project Payara by payara.

the class DomainConfigTest method testGetAttributes.

public void testGetAttributes() {
    final DomainConfig mgr = getDomainConfig();
    mgr.getApplicationRoot();
    mgr.getLocale();
    mgr.getLogRoot();
}
Also used : DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 8 with DomainConfig

use of com.sun.appserv.management.config.DomainConfig in project Payara by payara.

the class ReferencesTest method testCreateRefToMissingTarget.

public void testCreateRefToMissingTarget() {
    if (!checkNotOffline("testCreateRemove")) {
        return;
    }
    final String MISSING_NAME = "NonExistent";
    final DomainConfig domainConfig = getDomainRoot().getDomainConfig();
    final StandaloneServerConfig serverConfig = domainConfig.getServersConfig().getStandaloneServerConfigMap().get("server");
    try {
        serverConfig.createResourceRefConfig(MISSING_NAME);
        assert false;
        serverConfig.createDeployedItemRefConfig(MISSING_NAME);
        assert false;
    } catch (Exception e) {
    // good
    }
}
Also used : StandaloneServerConfig(com.sun.appserv.management.config.StandaloneServerConfig) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 9 with DomainConfig

use of com.sun.appserv.management.config.DomainConfig in project Payara by payara.

the class ConfigConfigTest method ensureDefaultInstance.

public static ConfigConfig ensureDefaultInstance(final DomainRoot domainRoot) {
    ConfigConfig config = null;
    final DomainConfig domainConfig = domainRoot.getDomainConfig();
    final Map<String, ConfigConfig> existing = domainConfig.getConfigsConfig().getConfigConfigMap();
    if (supportsMultipleServers(domainRoot)) {
        config = existing.get(getDefaultInstanceName(domainRoot));
        if (config == null) {
            final ConfigSetup setup = new ConfigSetup(domainRoot);
            config = setup.createConfig(getDefaultInstanceName(domainRoot));
        }
    } else {
        config = existing.get(PE_CONFIG_NAME);
        assert (config != null) : "No config named " + StringUtil.quote(PE_CONFIG_NAME);
    }
    return config;
}
Also used : ConfigConfig(com.sun.appserv.management.config.ConfigConfig) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 10 with DomainConfig

use of com.sun.appserv.management.config.DomainConfig in project Payara by payara.

the class ConfigRunMeFirstTest method setupConfig.

private void setupConfig() {
    final DomainConfig dc = getDomainConfig();
    final ConfigConfig cc = getConfigConfig();
    final SecurityServiceConfig ss = cc.getSecurityServiceConfig();
    final AdminServiceConfig as = cc.getAdminServiceConfig();
    AuditModuleConfigTest.ensureDefaultInstance(ss);
    AuthRealmConfigTest.ensureDefaultInstance(ss);
    ConnectorConnectionPoolConfigTest.ensureDefaultInstance(dc);
    JMXConnectorConfigTest.ensureDefaultInstance(as);
    ResourceAdapterConfigTest.ensureDefaultInstance(dc);
    AdminObjectResourceConfigTest.ensureDefaultInstance(dc);
    JDBCConnectionPoolConfigTest.ensureDefaultInstance(dc);
    JDBCResourceConfigTest.ensureDefaultInstance(dc);
    JNDIResourceConfigTest.ensureDefaultInstance(dc);
    ConnectorResourceConfigTest.ensureDefaultInstance(dc);
    CustomMBeanConfigTest.ensureDefaultInstance(dc);
    JACCProviderConfigTest.ensureDefaultInstance(ss);
    MailResourceConfigTest.ensureDefaultInstance(dc);
    ThreadPoolConfigTest.ensureDefaultInstance(cc);
    PersistenceManagerFactoryResourceConfigTest.ensureDefaultInstance(dc);
    CustomResourceConfigTest.ensureDefaultInstance(dc);
    ProfilerConfigTest.ensureDefaultInstance(cc.getJavaConfig());
}
Also used : AdminServiceConfig(com.sun.appserv.management.config.AdminServiceConfig) ConfigConfig(com.sun.appserv.management.config.ConfigConfig) SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Aggregations

DomainConfig (com.sun.appserv.management.config.DomainConfig)12 AMX (com.sun.appserv.management.base.AMX)2 ClusteredServerConfig (com.sun.appserv.management.config.ClusteredServerConfig)2 ConfigConfig (com.sun.appserv.management.config.ConfigConfig)2 DomainRoot (com.sun.appserv.management.DomainRoot)1 AdminServiceConfig (com.sun.appserv.management.config.AdminServiceConfig)1 ClusterConfig (com.sun.appserv.management.config.ClusterConfig)1 CustomMBeanConfig (com.sun.appserv.management.config.CustomMBeanConfig)1 NodeAgentConfig (com.sun.appserv.management.config.NodeAgentConfig)1 ResourceConfig (com.sun.appserv.management.config.ResourceConfig)1 ResourceRefConfig (com.sun.appserv.management.config.ResourceRefConfig)1 ResourceRefConfigCR (com.sun.appserv.management.config.ResourceRefConfigCR)1 SecurityServiceConfig (com.sun.appserv.management.config.SecurityServiceConfig)1 StandaloneServerConfig (com.sun.appserv.management.config.StandaloneServerConfig)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Set (java.util.Set)1 ObjectName (javax.management.ObjectName)1