Examples of NodeAgent


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

    {      
        final ConfigContext configContext =
            ApplicationServer.getServerContext().getConfigContext();
        final Domain domain = ServerBeansFactory.getDomainBean(configContext);
        final NodeAgents controllers = domain.getNodeAgents();
        final NodeAgent controller = controllers.getNodeAgentByName(getNodeAgentName());
       
        boolean rendezvousOccurred = true;
        ElementProperty rendezvousProperty = null;
       
        //It is an expected case for the controller to be null. In the case where we
        //are unbinding from a node agent, the node controller element will already be
        //removed before invoking synchronizeWithDAS via this proxy.
        //Tested case where nodeagent has never rendezvoused and then it is deleted, works correctly
        //with connection failure exception being thrown
        if (controller != null) {                   
            //See if a rendezvous has occurred       
            rendezvousProperty = controller.getElementPropertyByName(
                IAdminConstants.RENDEZVOUS_PROPERTY_NAME);           
            rendezvousOccurred = new Boolean(rendezvousProperty.getValue()).booleanValue();                
        }
       
        if (rendezvousOccurred) {
View Full Code Here

Examples of com.sun.enterprise.ee.nodeagent.NodeAgent

            "false");
        boolean bRendezvous = new Boolean(rendezvous).booleanValue();
        boolean bLocalRendezvous = new Boolean(localRendezvous).booleanValue();
        if (bRendezvous || bLocalRendezvous) {
            boolean bDidRendezvous = false;
            NodeAgent agent = new NodeAgent(config);           
            // We need to disable any logging emitted by the NodeAgent unless -DDebug is set.
            Logger naLogger = agent.getLogger();           
            Level naLevel = naLogger.getLevel();           
            if (!CLILogger.isDebug())  {                               
                naLogger.setLevel(Level.OFF);               
            } else {               
                naLogger.setLevel(Level.FINEST);
            }
            try {
                IdentityManager.setUser((String)config.get(AgentConfig.K_DAS_USER));
                IdentityManager.setPassword((String)config.get(AgentConfig.K_DAS_PASSWORD));
                IdentityManager.setMasterPassword((String)config.get(AgentConfig.K_MASTER_PASSWORD));
                if (bRendezvous) {
                    try {                                 
                        agent.rendezvousWithDAS();
                    } catch (Exception ex) {
                        //An IOException indicates that the DAS is not reachable and as such
                        //should not be considered an error.
                        if (!(ex instanceof IOException)) {
                            throw ex;
                        } else {
                            bDidRendezvous = false;
                        }
                    }
                }
                if (!bDidRendezvous && bLocalRendezvous) {                   
                    agent.localRendezvousWithDAS();
                }       
            } finally {
                //Re-establish the old debugging levels               
                naLogger.setLevel(naLevel);               
            }
View Full Code Here

Examples of org.apache.uima.ducc.agent.NodeAgent

  public NodeAgent nodeAgent() throws Exception {
    try {
      camelContext = common.camelContext();
      camelContext.disableJMX();

      NodeAgent agent = new NodeAgent(nodeIdentity(), launcher(), camelContext, this);
      // optionally configures Camel Context for JMS. Checks the 'agentRequestEndpoint' to
      // to determine type of transport. If the the endpoint starts with "activemq:", a
      // special ActiveMQ component will be activated to enable JMS transport
      agentTransport.configureJMSTransport(logger,common.agentRequestEndpoint, camelContext);
      AgentEventListener delegateListener = agentDelegateListener(agent);

      if (common.managedProcessStateUpdateEndpointType != null
              && common.managedProcessStateUpdateEndpointType.equalsIgnoreCase("socket")) {
        String agentSocketParams = "";
        if (common.managedProcessStateUpdateEndpointParams != null) {
          agentSocketParams = "?" + common.managedProcessStateUpdateEndpointParams;
        }
        int agentPort = Utils.findFreePort();
        common.managedProcessStateUpdateEndpoint = "mina:tcp://localhost:" + agentPort
                + agentSocketParams;
        // Remember the agent port since we need to tell JPs where to send their state updates
        System.setProperty(NodeAgent.ProcessStateUpdatePort, String.valueOf(agentPort));
      }
      camelContext
              .addRoutes(this.routeBuilderForManagedProcessStateUpdate(agent, delegateListener));
      camelContext.addRoutes(this.routeBuilderForIncomingRequests(agent, delegateListener));
      camelContext.addRoutes(this.routeBuilderForNodeInventoryPost(agent,
              common.nodeInventoryEndpoint, Integer.parseInt(common.nodeInventoryPublishRate)));
      metricsRouteBuilder = this.routeBuilderForNodeMetricsPost(agent, common.nodeMetricsEndpoint,
              Integer.parseInt(common.nodeMetricsPublishRate));
      camelContext.addRoutes(metricsRouteBuilder);
     
     
     
      logger.info("nodeAgent", null, "------- Agent Initialized - Identity Name:"
              + agent.getIdentity().getName() + " IP:" + agent.getIdentity().getIp()
              + " JP State Update Endpoint:" + common.managedProcessStateUpdateEndpoint);
      return agent;

    } catch (Exception e) {
      e.printStackTrace();
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.