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));
}
}
}
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();
}
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
}
}
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;
}
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());
}
Aggregations