Package org.rhq.modules.plugins.jbossas7.helper

Examples of org.rhq.modules.plugins.jbossas7.helper.HostConfiguration.obtainXmlPropertyViaXPath()


        String sbindingRef = hostConfig.obtainXmlPropertyViaXPath(
                ("//management/management-interfaces/http-interface/socket-binding/@http"));
        assert "management-http".equals(sbindingRef): "Socketbinding was " + sbindingRef;

        String pathExpr = "/server/socket-binding-group/socket-binding[@name='" + sbindingRef + "']/@port";
        String port = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.management.http.port:9990}".equals(port) : "Port was [" + port + "]";

        pathExpr = "/server/socket-binding-group/socket-binding[@name='" + sbindingRef + "']/@interface";
        String interfName = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "management".equals(interfName) : "Interface was " + interfName;
View Full Code Here


        String pathExpr = "/server/socket-binding-group/socket-binding[@name='" + sbindingRef + "']/@port";
        String port = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.management.http.port:9990}".equals(port) : "Port was [" + port + "]";

        pathExpr = "/server/socket-binding-group/socket-binding[@name='" + sbindingRef + "']/@interface";
        String interfName = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "management".equals(interfName) : "Interface was " + interfName;

        pathExpr = "/server/interfaces/interface[@name='" + interfName + "']/inet-address/@value";
        String interfElem = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.bind.address.management:127.0.0.71}".equals(interfElem) : "InterfElem was " + interfElem;
View Full Code Here

        pathExpr = "/server/socket-binding-group/socket-binding[@name='" + sbindingRef + "']/@interface";
        String interfName = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "management".equals(interfName) : "Interface was " + interfName;

        pathExpr = "/server/interfaces/interface[@name='" + interfName + "']/inet-address/@value";
        String interfElem = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.bind.address.management:127.0.0.71}".equals(interfElem) : "InterfElem was " + interfElem;

        String socketBindingGroupName = "standard-sockets";
        pathExpr = "/server/socket-binding-group[@name='" + socketBindingGroupName + "']/@port-offset";
        String offsetAttr = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
View Full Code Here

        String interfElem = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.bind.address.management:127.0.0.71}".equals(interfElem) : "InterfElem was " + interfElem;

        String socketBindingGroupName = "standard-sockets";
        pathExpr = "/server/socket-binding-group[@name='" + socketBindingGroupName + "']/@port-offset";
        String offsetAttr = hostConfig.obtainXmlPropertyViaXPath(pathExpr);
        assert "${jboss.socket.binding.port-offset:123}".equals(offsetAttr) : "Port-Offset was " + offsetAttr;
    }

    public void testGetRealm() throws Exception {
        URL url = getClass().getClassLoader().getResource("standalone71.xml");
View Full Code Here

    public void testGetRealm() throws Exception {
        URL url = getClass().getClassLoader().getResource("standalone71.xml");
        HostConfiguration hostConfig = new HostConfiguration(new File(url.getPath()));

        String realm = hostConfig.obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/@security-realm");
        assert "ManagementRealm".equals(realm) : "Realm was " + realm;

        String xpathExpression = "//management//security-realm[@name ='%s']/authentication/properties/@path";

        String propsFileName = hostConfig.obtainXmlPropertyViaXPath(String.format(xpathExpression,realm));
View Full Code Here

        String realm = hostConfig.obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/@security-realm");
        assert "ManagementRealm".equals(realm) : "Realm was " + realm;

        String xpathExpression = "//management//security-realm[@name ='%s']/authentication/properties/@path";

        String propsFileName = hostConfig.obtainXmlPropertyViaXPath(String.format(xpathExpression,realm));
        assert "mgmt-users.properties".equals(propsFileName) : "File name was " + propsFileName;

        String propsFilePathRel = hostConfig.obtainXmlPropertyViaXPath("//management//security-realm[@name ='" + realm + "']/authentication/properties/@relative-to");
        assert "jboss.server.config.dir".equals(propsFilePathRel) : "Path was " + propsFileName;
    }
View Full Code Here

        String xpathExpression = "//management//security-realm[@name ='%s']/authentication/properties/@path";

        String propsFileName = hostConfig.obtainXmlPropertyViaXPath(String.format(xpathExpression,realm));
        assert "mgmt-users.properties".equals(propsFileName) : "File name was " + propsFileName;

        String propsFilePathRel = hostConfig.obtainXmlPropertyViaXPath("//management//security-realm[@name ='" + realm + "']/authentication/properties/@relative-to");
        assert "jboss.server.config.dir".equals(propsFilePathRel) : "Path was " + propsFileName;
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.