Package org.rhq.modules.plugins.jbossas7

Examples of org.rhq.modules.plugins.jbossas7.WebRuntimeComponent


         for (MeasurementScheduleRequest req : metrics) {
            if (req.getName().equals("appuid")) {

                Address addr = new Address("core-service=platform-mbean,type=runtime");
                ReadAttribute op = new ReadAttribute(addr,"system-properties");
                ASConnection conn = parent.getASConnection();
                ComplexResult result = conn.executeComplex(op);

                if (result.isSuccess()) {
                    Map<String,Object> data = result.getResult();
                    if (data.containsKey("OPENSHIFT_APP_UUID")) {
                        String uid = (String) data.get("OPENSHIFT_APP_UUID");
View Full Code Here


            .setHost(STANDALONE_HOST) //
            .setPort(STANDALONE_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
        return new ASConnection(asConnectionParams);
    }
View Full Code Here

            .setHost(DC_HOST) //
            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
        return new ASConnection(asConnectionParams);
    }
View Full Code Here

            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .setKeepAliveTimeout(Long.valueOf(-1)) //
            .createASConnectionParams();
        ASConnection asConnection = new ASConnection(asConnectionParams);
        List<Future<Result>> results = doTest(asConnection);
        checkResults(results, true);
        // Wait a bit
        Thread.sleep(1000 * 30);
        // We should still be able to reach the server
View Full Code Here

            .setHost(DC_HOST) //
            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
        ASConnection asConnection = new ASConnection(asConnectionParams);
        List<Future<Result>> results = doTest(asConnection);
        checkResults(results, true);
        // Wait for EAP to close persistent connections server side
        Thread.sleep(1000 * 30);
        // We should still be able to reach the server
View Full Code Here

            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .setKeepAliveTimeout(Long.valueOf(1000 * 60 * 60)) //
            .createASConnectionParams();
        ASConnection asConnection = new ASConnection(asConnectionParams);
        List<Future<Result>> results = doTest(asConnection);
        checkResults(results, true);
        // Wait for EAP to close persistent connections server side
        Thread.sleep(1000 * 30);
        // Next operation should fail as server has closed connection and client did not
View Full Code Here

* @author Heiko W. Rupp
*/
public class ServerGroupTest extends AbstractIntegrationTest {

    public void createServerGroupViaApi() throws Exception {
        ASConnection connection = getDomainControllerASConnection();
        HostControllerComponent hcc = new HostControllerComponent();
        hcc.setConnection(connection);

        Configuration rc = new Configuration();
        rc.put(new PropertySimple("profile", "default"));
        rc.put(new PropertySimple("socket-binding-group", "standard-sockets"));
        ResourceType rt = new ResourceType("ServerGroup", PLUGIN_NAME, ResourceCategory.SERVICE, null);

        String serverGroupName = "_test-sg";
        try {
            CreateResourceReport report = new CreateResourceReport(serverGroupName, rt, new Configuration(), rc, null);
            report = hcc.createResource(report);

            assert report != null : "Report was null.";
            assert report.getStatus() == CreateResourceStatus.SUCCESS : "Create was a failure: "
                + report.getErrorMessage();
        } finally {
            Remove r = new Remove("server-group", serverGroupName);
            connection.execute(r);
        }
    }
View Full Code Here

@Test(groups = { "integration", "nonpc" }, dependsOnGroups = "discovery")
public abstract class AbstractIntegrationTest {

    String uploadToAs(String deploymentPath) throws IOException {
        String fileName = new File(deploymentPath).getName();
        ASConnectionParams asConnectionParams = new ASConnectionParamsBuilder() //
            .setHost(DC_HOST) //
            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
View Full Code Here

    private ASConnectionFactory() {
        // Utility class
    }

    public static ASConnection getStandaloneASConnection() {
        ASConnectionParams asConnectionParams = new ASConnectionParamsBuilder() //
            .setHost(STANDALONE_HOST) //
            .setPort(STANDALONE_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
View Full Code Here

            .createASConnectionParams();
        return new ASConnection(asConnectionParams);
    }

    public static ASConnection getDomainControllerASConnection() {
        ASConnectionParams asConnectionParams = new ASConnectionParamsBuilder() //
            .setHost(DC_HOST) //
            .setPort(DC_HTTP_PORT) //
            .setUsername(MANAGEMENT_USERNAME) //
            .setPassword(MANAGEMENT_PASSWORD) //
            .createASConnectionParams();
View Full Code Here

TOP

Related Classes of org.rhq.modules.plugins.jbossas7.WebRuntimeComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.