/*
(non-Javadoc)

@see org.mobicents.protocols.api.Management#start()
2853
@Override
    public void start() throws Exception {
        if (this.started) {
            logger.warn(String.format("management=%s is already started", this.name));
            return;
        }

        synchronized (this) {
            this.persistFile.clear();

            if (persistDir != null) {
                this.persistFile.append(persistDir).append(File.separator).append(this.name).append("_")
                        .append(PERSIST_FILE_NAME);
            } else {
                persistFile.append(System.getProperty(SCTP_PERSIST_DIR_KEY, System.getProperty(USER_DIR_KEY)))
                        .append(File.separator).append(this.name).append("_").append(PERSIST_FILE_NAME);
            }

            logger.info(String.format("SCTP configuration file path %s", persistFile.toString()));

            this.bossGroup = new NioEventLoopGroup(1, new DefaultThreadFactory("Sctp-BossGroup-" + this.name));
            // TODO: make a thread count for WorkerGroup configurable
            this.workerGroup = new NioEventLoopGroup(0, new DefaultThreadFactory("Sctp-WorkerGroup-" + this.name));
            this.clientExecutor = new ScheduledThreadPoolExecutor(1, new DefaultThreadFactory("Sctp-ClientExecutorGroup-"
                    + this.name));

            // this.nettyClientOpsThread = new NettyClientOpsThread(this);
            // (new Thread(this.nettyClientOpsThread )).start();

            try {
                this.load();
            } catch (FileNotFoundException e) {
                logger.warn(String.format("Failed to load the SCTP configuration file. \n%s", e.getMessage()));
            }

            this.started = true;

            if (logger.isInfoEnabled()) {
                logger.info(String.format("Started SCTP Management=%s", this.name));
            }

            for (ManagementEventListener lstr : managementEventListeners) {
                try {
                    lstr.onServiceStarted();
                } catch (Throwable ee) {
                    logger.error("Exception while invoking onServiceStarted", ee);
                }
            }
        }
    }
1042606
public void start() {
        logger.info("----------------------------"); //$NON-NLS-1$
        logger.info(Messages.i18n.format("StorageImportDispatcher.StartingImport")); //$NON-NLS-1$

        policyDefIndex.clear();
        currentOrg = null;
        currentPlan = null;
        currentApi = null;
        currentClient = null;
        currentClientVersion = null;
        contracts.clear();
        apisToPublish.clear();
        clientsToRegister.clear();
        gatewayLinkCache.clear();

        try {
            this.storage.beginTx();
        } catch (StorageException e) {
            throw new RuntimeException(e);
        }
    }
227836
synchronized void start(final ManagedServerBootCmdFactory factory) {
        final InternalState required = this.requiredState;
        // Ignore if the server is already started
        if(required == InternalState.SERVER_STARTED) {
            return;
        }
        // In case the server failed to start, try to start it again
        if(required != InternalState.FAILED) {
            final InternalState current = this.internalState;
            if(current != required) {
                // TODO this perhaps should wait?
                throw new IllegalStateException();
            }
        }
        operationID = CurrentOperationIdHolder.getCurrentOperationID();
        bootConfiguration = factory.createConfiguration();
        requiredState = InternalState.SERVER_STARTED;
        ROOT_LOGGER.startingServer(serverName);
        transition();
    }
1257625
@Override
  protected void startUp() {
    try {
      startRTS();
    } catch (Exception e) {
      throw new IllegalArgumentException("Cannot initiate RTS. Missing or bad arguments");
    }
    try {
      startHFTA();
    } catch (Exception e) {
      throw new IllegalArgumentException("Cannot initiate HFTA processes. Missing or bad arguments");
    }
    try {
      startGSEXIT();
    } catch (Exception e) {
      throw new IllegalArgumentException("Cannot initiate GSEXIT processes. Missing or bad arguments");
    }
  }
1002430
public void start() throws InterruptedException, ExecutionException {
        Future<?> task = es.submit(handlePartitionChange);
        task.get();
    }
98849
@Synchronized
  final void start(Optional<String> name) {
    if (!this.isStarted) {
      this.startImpl(name);
      this.isStarted = true;
    }
  }
1170382
@Override
  public void start() throws Exception {
    mJournalSystem.start();
    mJournalSystem.gainPrimacy();
    startMaster(true);
    startServing();
  }
265376
@Override
    public String start() {
        if (mConsumed) {
            throw new IllegalStateException("task has been executed already");
        }
        if (Config.DEBUG) {
            Log.v(TAG, "start() " + getName());
        }
        mConsumed = true;
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                execute();
            }
        };
        final long delayMillis = mInfo.delayMillis;
        if (delayMillis > 0) {
            mInfo.handler.postDelayed(runnable, delayMillis);
        } else {
            runnable.run();
        }
        return getName();
    }
1113393
public final synchronized void start() throws IOException {
		LaunchingMessageKind.IJMX0001.format(this.host, this.port);
		this.mbs = ManagementFactory.getPlatformMBeanServer();

		final String oldRmiServerName = System
				.getProperty("java.rmi.server.hostname");
		System.setProperty("java.rmi.server.hostname", this.host);

		register = LocateRegistry.createRegistry(this.port);
		if (oldRmiServerName == null) {
			final Properties props = System.getProperties();
			for (Object key : props.keySet()) {
				if (key.equals("java.rmi.server.hostname")) {
					props.remove(key);
					break;
				}
			}
		} else {
			System.setProperty("java.rmi.server.hostname", oldRmiServerName);
		}

		final String serviceURL = String.format(serverUrlFormat, this.host,
				this.host, this.port);
		LaunchingMessageKind.IJMX0002.format(serviceURL);

		final JMXServiceURL url = new JMXServiceURL(serviceURL);
		this.jmxConnectorServer = JMXConnectorServerFactory
				.newJMXConnectorServer(url, null, mbs);
		this.jmxConnectorServer.start();
		registerMBeans();
	}
738726
@InterfaceAudience.Public
    public void start() {

        if (runningState.get() == true) {
            Log.v(Log.TAG_QUERY, "%s: start() called, but runningState is already true.  Ignoring.", this);
            return;
        } else {
            Log.d(Log.TAG_QUERY, "%s: start() called", this);
            runningState.set(true);
        }

        if (!observing) {
            observing = true;
            getDatabase().addChangeListener(this);
            Log.v(Log.TAG_QUERY, "%s: start() is calling update()", this);
            update();
        }
    }
542060
void start(Handler<ConnectionOutputBatch> startHandler) {
    connection.doBatchStart(id, args);
    this.startHandler = startHandler;
  }
186905
@Override
	public void start() {
		if (state.start()){
			try{
				doStart();
				state.finishStarting();
			}catch(Exception e){
				state.failStarting();
				logger.warn("Failed to start {}", this.getClass().getName(), e);
			}
		}

	}
1347081
public void start() {
        Thread thread = new Thread(new LogCatCommandExecutor());
        thread.setName(getClass().getSimpleName() + " logcat for " + device.getSerialNumber());
        thread.start();

        try {
            sleep(500); // ignore old output that logcat feeds us
        } catch (InterruptedException e) {
        }

        logListenerCommandShell.activate();
    }
633855
@Override
	public void start(BundleContext context) throws Exception {
		final String sourceMethod = "start"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(Activator.class.getName(), sourceMethod, new Object[]{context});
		}
		super.start(context);

		// Verify the bundle id.
		if (!context.getBundle().getSymbolicName().equals(BUNDLE_NAME)) {
			throw new IllegalStateException();
		}
		serviceRegistrations = new LinkedList<ServiceRegistration<?>>();
		Activator.context = context;
		Dictionary<String, String> dict = new Hashtable<String, String>();
		dict.put("name", BUNDLE_NAME); //$NON-NLS-1$

		ServiceRegistration<?> commandProviderReg = registerCommandProvider();
		if (commandProviderReg != null) {
			serviceRegistrations.add(commandProviderReg);
		}
		// Create the executors provider.  The executors provider is created by the
		// activator primarily to allow executors to be shared by all of the
		// aggregators created by this bundle.
		dict = new Hashtable<String, String>();
		dict.put("name", BUNDLE_NAME); //$NON-NLS-1$
		executors = newExecutors();
		serviceRegistrations.add(
				context.registerService(IExecutors.class.getName(), executors, dict));

		if (isTraceLogging) {
			log.exiting(Activator.class.getName(), sourceMethod);
		}
	}
1095062
void start(final Handler<OutputGroup> startHandler) {
    connection.doGroupStart(id, name, args, parent);
    this.startHandler = startHandler;
  }
710688
@Override
    public void start(int mode) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "start, mode ", mode);

//        _eventNotificationEnabled = isEventNotificationPropertySet();
//        notifyMessagingEngineStarting(getName(), getUuid().toString(), "STANDARD_MODE");

        boolean startFailed = false;
        ListIterator<ComponentList> li = null;
        synchronized (stateChangeLock) {

            if (_state == STATE_STOPPED)
                setState(STATE_STARTING);

        } // synchronized (stateChangeLock)

        try {
            //Start the message store 
            _messageStore.start();
            //Start the message processor
            _messageProcessor.start(0);
            setState(STATE_STARTED);
        } catch (Exception e) {
            if (!(e.getCause() instanceof SeverePersistenceException))
                com.ibm.ws.ffdc.FFDCFilter.processException(e, CLASS_NAME + ".start", "626", this);
            SibTr.error(tc, "ME_CANNOT_BE_STARTED_SIAS0034", new Object[] { _name, "", "start()" });
            SibTr.exception(tc, e);
            startFailed = true;
        }

        if (startFailed) {
            SibTr.error(tc, "ME_RESTART_CHECK_SIAS0027", getName());
            stop(JsConstants.ME_STOP_FORCE);
            destroy();
            setState(STATE_STOPPED);
        } else {
            // Find the MP administrator class
            _mpAdmin = ((SIMPAdmin) getMessageProcessor()).getAdministrator();
            setState(STATE_STARTED);
        }

        if (!startFailed) {
            serverStarted();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Messaging Engine " + _name + " with UUID " + _uuid + " has been started.");
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Messaging engine failed");

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "start");
    }
1154442
public void start() throws Exception
    {
        Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED));

        //Try to restore data from backup before zookeeper will be started
        backupManager.restoreAll();

        activityQueue.start();
        configManager.start();
        monitorRunningInstance.start();
        cleanupManager.start();
        backupManager.start();
        autoInstanceManagement.start();
        if ( servoMonitoring != null )
        {
            servoMonitoring.start();
        }

        configManager.addConfigListener
        (
            new ConfigListener()
            {
                @Override
                public void configUpdated()
                {
                    try
                    {
                        resetLocalConnection();
                    }
                    catch ( IOException e )
                    {
                        log.add(ActivityLog.Type.ERROR, "Resetting connection", e);
                    }
                }
            }
        );
    }