use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class ClusteredMessagingTestCase method setUp.
@Before
public void setUp() throws Exception {
container.start(CONTAINER_0);
container.start(CONTAINER_1);
// both servers are started and configured
assertTrue(container.isStarted(CONTAINER_0));
assertTrue(container.isStarted(CONTAINER_1));
try (ModelControllerClient client = createClient1()) {
JMSOperations jmsOperations = JMSOperationsProvider.getInstance(client);
jmsOperations.createJmsQueue(jmsQueueName, "java:jboss/exported/" + jmsQueueLookup);
jmsOperations.createJmsTopic(jmsTopicName, "java:jboss/exported/" + jmsTopicLookup);
}
try (ModelControllerClient client = createClient2()) {
JMSOperations jmsOperations = JMSOperationsProvider.getInstance(client);
jmsOperations.createJmsQueue(jmsQueueName, "java:jboss/exported/" + jmsQueueLookup);
jmsOperations.createJmsTopic(jmsTopicName, "java:jboss/exported/" + jmsTopicLookup);
}
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class OutboundLdapConnectionTestCase method initializeRoleConfiguration.
@Before
public void initializeRoleConfiguration() throws Exception {
if (containerController.isStarted(CONTAINER) && !serverConfigured) {
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
ManagementClient mgmtClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
prepareServer(mgmtClient);
}
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class VaultSystemPropertyOnServerStartTestCase method beforeTest.
@Before
public void beforeTest() throws Exception {
LOGGER.trace("*** starting server");
container.start(CONTAINER);
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
serverSetup.setup(managementClient, CONTAINER);
LOGGER.trace("Add system property: " + TESTING_SYSTEM_PROPERTY);
ModelNode op = Util.createAddOperation(SYSTEM_PROPERTIES_PATH);
op.get(VALUE).set(BasicVaultServerSetupTask.VAULTED_PROPERTY);
Utils.applyUpdate(op, managementClient.getControllerClient());
LOGGER.trace("*** stoping server");
container.stop(CONTAINER);
Thread.sleep(1000);
int i = 0;
while (managementClient.isServerInRunningState() && ++i < 200) {
Thread.sleep(50);
}
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class CertificateRolesLoginModuleTestCase method stopContainer.
@Test
@InSequence(3)
public void stopContainer() throws Exception {
deployer.undeploy(APP_NAME);
final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** reseting test configuration");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.tearDown(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.tearDown(managementClient, CONTAINER);
LOGGER.trace("*** stopping container");
containerController.stop(CONTAINER);
}
use of org.jboss.as.controller.client.ModelControllerClient in project wildfly by wildfly.
the class CertificateRolesLoginModuleTestCase method startAndSetupContainer.
@Test
@InSequence(-1)
public void startAndSetupContainer() throws Exception {
LOGGER.trace("*** starting server");
containerController.start(CONTAINER);
ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
LOGGER.trace("*** will configure server now");
AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.setup(managementClient, CONTAINER);
SecurityDomainsSetup.INSTANCE.setup(managementClient, CONTAINER);
LOGGER.trace("*** reloading server");
executeReloadAndWaitForCompletion(client, 100000);
deployer.deploy(APP_NAME);
}
Aggregations