Package com.sun.enterprise.config.serverbeans

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


            startService(iiopListeners[i]);
      logFine("Started ASSocketService for IIOP(S)");
  }

  // Start JMX Connector ports
  AdminService adminService = conf.getAdminService();
  JmxConnector[] jmxConnectors = adminService.getJmxConnector();
  for ( int i=0; i<jmxConnectors.length; i++ ) {
      if ( !jmxConnectors[i].isEnabled() )
    continue;
            startService(jmxConnectors[i], false, 0);
      logFine("Started ASSocketService for JMX Connector ");
View Full Code Here


                //checkDuplicate("mime",httpservice.getMime(), "name");
                checkDuplicate("virtual-server", httpservice.getVirtualServer(), "id");
               
                IiopService iiopservice = config[i].getIiopService();
                checkDuplicate("iiop-listener",iiopservice.getIiopListener(), "id");
                AdminService adminservice = config[i].getAdminService();
                checkDuplicate("jmx-connector",adminservice.getJmxConnector(), "name");
               
                JmsService jmsservice = config[i].getJmsService();
                checkDuplicate("jms-host",jmsservice.getJmsHost(), "name");
               
                SecurityService securityservice = config[i].getSecurityService();
View Full Code Here

        notifyAllNodeAgentsOfNewLocation(configContext);
    }

    private void notifyAllNodeAgentsOfNewLocation(ConfigContext cc) {
        try {
            AdminService as = ServerHelper.getAdminServiceForServer(
                                cc, "server");
            JmxConnector config = as.getJmxConnectorByName(
                                      as.getSystemJmxConnectorName());           
            ElementProperty clientHostname = config.getElementPropertyByName(
                                            IAdminConstants.HOST_PROPERTY_NAME);
            if (clientHostname != null) {
                String newHost = (String) clientHostname.getValue();
                NodeAgent[] nas = NodeAgentHelper.getNodeAgentsInDomain(cc);
View Full Code Here

                        new Object[] {newHost + ":" + newPort, newHost} );   
    }

    private void setJMXConnectorInfo(String newHost, String newPort
    throws ConfigException {    
        AdminService as = ServerHelper.getAdminServiceForServer(
                            getConfigContext(), "server");
        JmxConnector jmxConn = as.getJmxConnectorByName(
                                as.getSystemJmxConnectorName());
        jmxConn.setPort(newPort);

        ElementProperty clientHostname =
            jmxConn.getElementPropertyByName(HOST_PROPERTY_NAME);
        clientHostname.setValue(HOST_PROPERTY_NAME, newHost);
View Full Code Here

    }  

    private boolean haveDASCoordinatesChanged(String newHost, String newPort)
    throws ConfigException {
       
        AdminService as =
            ServerHelper.getAdminServiceForServer(getConfigContext(), "server");
        JmxConnector jmxConn =
            as.getJmxConnectorByName(as.getSystemJmxConnectorName());
       
        if (!jmxConn.getPort().equals(newPort)) return true;

        ElementProperty clientHostname =
            jmxConn.getElementPropertyByName(HOST_PROPERTY_NAME);
View Full Code Here

    public void onTermination() throws ServerLifecycleException {
    }

    private void initConnectorConfig() throws ConfigException {
        //This is the AdminService config bean
        AdminService as = ServerBeansFactory.getConfigBean(initContext.getConfigContext()).
                  getAdminService();
        connectorConfig = as.getJmxConnectorByName(as.getSystemJmxConnectorName());
        if (connectorConfig.isEnabled()) {
            this.isEnabled = true;
        }
    }
View Full Code Here

            // Please see http://java.net/jira/browse/GLASSFISH-16665 for details
            // The workaround duplicates code from AdminAdapter.
            ServerEnvironment serverEnvironment = habitat.getByContract(ServerEnvironment.class);
            final Principal sslPrincipal = !serverEnvironment.isDas() || Boolean.getBoolean(DAS_LOOK_FOR_CERT_PROPERTY_NAME) ? req.getUserPrincipal() : null;

            AdminService as = habitat.getByType(AdminService.class);
            access =  authenticator.loginAsAdmin(user, password, as.getAuthRealmName(), remoteHost, getAuthRelatedHeaders(req), sslPrincipal);
        }
        return access;
    }
View Full Code Here

        }
        return protocol;
    }

    private void addSslToJMXConnector(Config config, ActionReport report) {
        AdminService adminService = config.getAdminService();
        // ensure we have the specified listener
        JmxConnector jmxConnector = null;
        for (JmxConnector jmxConn : adminService.getJmxConnector()) {
            if (jmxConn.getName().equals(listenerId)) {
                jmxConnector = jmxConn;
            }
        }
        if (jmxConnector == null) {
View Full Code Here

    public Protocol findOrCreateProtocol(final String name) throws TransactionFailure {
        return findOrCreateProtocol(name, true);
    }

    private void addSslToJMXConnector(Config config, ActionReport report) {
        AdminService adminService = config.getAdminService();
        // ensure we have the specified listener
        JmxConnector jmxConnector = null;
        for (JmxConnector jmxConn : adminService.getJmxConnector()) {
            if (jmxConn.getName().equals(listenerId)) {
                jmxConnector = jmxConn;
            }
        }
        if (jmxConnector == null) {
View Full Code Here

                port = Integer.valueOf(nl.getPort());
            } catch(NumberFormatException ne) {
                port = 8080;   // this is the last resort
            }
            //get the context root from admin-service
            AdminService as = cfg.getAdminService();
            if (as == null)
                guiContextRoot = ServerEnvironmentImpl.DEFAULT_ADMIN_CONSOLE_CONTEXT_ROOT;
            else
                setGuiContextRootFromAdminService(as);
        }
View Full Code Here

TOP

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

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.