Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Nodes


            return addr;
        }

        Dom serverDom = Dom.unwrap(server);
        Domain domain = serverDom.getHabitat().getService(Domain.class);
        Nodes nodes = serverDom.getHabitat().getService(Nodes.class);
        ServerEnvironment env =
                serverDom.getHabitat().getService(ServerEnvironment.class);

        if (server.isDas()) {
            if (env.isDas()) {
                // We are the DAS. Return our hostname
                return System.getProperty(
                        SystemPropertyConstants.HOST_NAME_PROPERTY);
            } else {
                return null;    // IT 12778 -- it is impossible to know
            }
        }

        String hostName = null;

        // Get it from the node associated with the server
        String nodeName = server.getNodeRef();
        if (StringUtils.ok(nodeName)) {
            Node node = nodes.getNode(nodeName);
            if (node != null) {
                hostName = node.getNodeHost();
            }
            // XXX Hack to get around the fact that the default localhost
            // node entry is malformed
View Full Code Here


        // for Instance it's going through this loop. This will use ssh utility to get file from instance machine(remote machine) and
        // store in domains/domain1/logs/<instance name> which is used to get LogFile object.
        // Right now user needs to go through this URL to setup and configure ssh http://wikis.sun.com/display/GlassFish/3.1SSHSetup
        SSHLauncher sshL = getSSHL(habitat);
        String sNode = targetServer.getNodeRef();
        Nodes nodes = domain.getNodes();
        Node node = nodes.getNode(sNode);

        if (node.getType().equals("SSH")) {

            sshL.init(node, logger);
View Full Code Here

        // for Instance it's going through this loop. This will use ssh utility to get file from instance machine(remote machine) and
        // store in  tempDirectoryOnServer which is used to create zip file.
        // Right now user needs to go through this URL to setup and configure ssh http://wikis.sun.com/display/GlassFish/3.1SSHSetup
        SSHLauncher sshL = getSSHL(habitat);
        String sNode = targetServer.getNodeRef();
        Nodes nodes = domain.getNodes();
        Node node = nodes.getNode(sNode);

        if (node.getType().equals("SSH")) {
            sshL.init(node, logger);

            Vector allInstanceLogFileName = getInstanceLogFileNames(habitat, targetServer, domain, logger, instanceName, instanceLogFileDirectory);
View Full Code Here

        }
        try {
            ConfigSupport.apply(new SingleConfigCode<Domain>() {
                public Object run(Domain d) throws PropertyVetoException, TransactionFailure {

                    Nodes nodes=d.createChild(Nodes.class);
                    Transaction t = Transaction.getTransaction(d);
                    if (t==null)
                        return null;

                    for( NodeAgent na: agList){
                        String host=null;
                        Node node = nodes.createChild(Node.class);

                        node.setName(na.getName());
                        node.setType("CONFIG");
                        JmxConnector jc = na.getJmxConnector();
                        if (jc != null){
                            List<Property> agentProp =jc.getProperty()//get the properties and see if host name is specified
                            for ( Property p : agentProp)  {
                                String name = p.getName();
                                if (name.equals("client-hostname")) {
                                    node.setNodeHost(p.getValue()); //create the node with a host name
                                    node.setInstallDir("${com.sun.aas.productRoot}");
                                }
                            }
                        }
                        nodes.getNode().add(node);
                    }

                    // Now add the builtin localhost node
                    createDefaultNode(d, nodes);
View Full Code Here

    private void createDefaultNodeList() {
        try {
            ConfigSupport.apply(new SingleConfigCode<Domain>() {
                public Object run(Domain d) throws PropertyVetoException, TransactionFailure {

                    Nodes nodes=d.createChild(Nodes.class);
                    Transaction t = Transaction.getTransaction(d);
                    if (t==null)
                        return null;

                    createDefaultNode(d, nodes);
View Full Code Here

            @Override
            public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure {
                // get the transaction
                Transaction t = Transaction.getTransaction(param);
                if (t!=null) {
                   Nodes nodes = ((Domain)param).getNodes();
                    Node node = nodes.getNode(nodeName);
                    Node writeableNode = t.enroll(node);
                    if (windowsdomain != null)
                        writeableNode.setWindowsDomain(windowsdomain);
                    if (nodedir != null)
                        writeableNode.setNodeDir(nodedir);
View Full Code Here

        // for Instance it's going through this loop. This will use ssh utility to get file from instance machine(remote machine) and
        // store in domains/domain1/logs/<instance name> which is used to get LogFile object.
        // Right now user needs to go through this URL to setup and configure ssh http://wikis.sun.com/display/GlassFish/3.1SSHSetup
        SSHLauncher sshL = getSSHL(habitat);
        String sNode = targetServer.getNodeRef();
        Nodes nodes = domain.getNodes();
        Node node = nodes.getNode(sNode);

        if (node.getType().equals("SSH")) {

            sshL.init(node, logger);
View Full Code Here

        // for Instance it's going through this loop. This will use ssh utility to get file from instance machine(remote machine) and
        // store in  tempDirectoryOnServer which is used to create zip file.
        // Right now user needs to go through this URL to setup and configure ssh http://wikis.sun.com/display/GlassFish/3.1SSHSetup
        SSHLauncher sshL = getSSHL(habitat);
        String sNode = targetServer.getNodeRef();
        Nodes nodes = domain.getNodes();
        Node node = nodes.getNode(sNode);

        if (node.getType().equals("SSH")) {
            sshL.init(node, logger);

            Vector allInstanceLogFileName = getInstanceLogFileNames(habitat, targetServer, domain, logger, instanceName, instanceLogFileDirectory);
View Full Code Here

                    ConfigParser parser = new ConfigParser(serviceLocator);
                    URL domainURL = domainXMLFile.toURI().toURL();
                    DomDocument doc = parser.parse(domainURL);
                    Dom domDomain = doc.getRoot();
                    Domain domain = domDomain.createProxy(Domain.class);
                    Nodes nodes = domain.getNodes();

                    for (Node node : nodes.getNode()) {
                        //make it Unix style and remove trailing slash
                        iDir = removeTrailingSlash(iDir.replaceAll("\\\\", "/"));
                        String d = removeTrailingSlash(node.getInstallDirUnixStyle());

                        //check both hostname and install location
View Full Code Here

                    ConfigParser parser = new ConfigParser(habitat);
                    URL domainURL = domainXMLFile.toURI().toURL();
                    DomDocument doc = parser.parse(domainURL);
                    Dom domDomain = doc.getRoot();
                    Domain domain = domDomain.createProxy(Domain.class);
                    Nodes nodes = domain.getNodes();

                    for (Node node : nodes.getNode()) {
                        //make it Unix style and remove trailing slash
                        iDir = removeTrailingSlash(iDir.replaceAll("\\\\", "/"));
                        String d = removeTrailingSlash(node.getInstallDirUnixStyle());

                        //check both hostname and install location
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Nodes

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.