This is the starting point for intitiating a new session.

@throws IllegalStateException
@throws SmackException
@throws InterruptedException
184052
public void startOutgoing() throws IllegalStateException, SmackException, InterruptedException {

        updatePacketListener();
        setSessionState(JingleSessionStatePending.getInstance());

        Jingle jingle = new Jingle(JingleActionEnum.SESSION_INITIATE);

        // Create a content negotiator for each media manager on the session.
        for (JingleMediaManager mediaManager : getMediaManagers()) {
            ContentNegotiator contentNeg = new ContentNegotiator(this, ContentNegotiator.INITIATOR, mediaManager.getName());

            // Create the media negotiator for this content description.
            contentNeg.setMediaNegotiator(new MediaNegotiator(this, mediaManager, mediaManager.getPayloads(), contentNeg));

            JingleTransportManager transportManager = mediaManager.getTransportManager();
            TransportResolver resolver = null;
            try {
                resolver = transportManager.getResolver(this);
            } catch (XMPPException e) {
                LOGGER.log(Level.WARNING, "exception", e);
            }

            if (resolver.getType().equals(TransportResolver.Type.rawupd)) {
                contentNeg.setTransportNegotiator(new TransportNegotiator.RawUdp(this, resolver, contentNeg));
            }
            if (resolver.getType().equals(TransportResolver.Type.ice)) {
                contentNeg.setTransportNegotiator(new TransportNegotiator.Ice(this, resolver, contentNeg));
            }

            addContentNegotiator(contentNeg);
        }

        // Give each of the content negotiators a chance to return a portion of the structure to make the Jingle packet.
        for (ContentNegotiator contentNegotiator : contentNegotiators) {
            jingle.addContent(contentNegotiator.getJingleContent());
        }

        // Save the session-initiate packet ID, so that we can respond to it.
        sessionInitPacketID = jingle.getStanzaId();

        sendStanza(jingle);

        // Now setup to track the media negotiators, so that we know when (if) to send a session-accept.
        setupListeners();

        // Give each of the content negotiators a chance to start
        // and return a portion of the structure to make the Jingle packet.

// Don't do this anymore.  The problem is that the other side might not be ready.
// Later when we receive our first jingle packet from the other side we'll fire-up the negotiators
// before processing it.  (See receivePacketAndRespond() above.
//        for (ContentNegotiator contentNegotiator : contentNegotiators) {
//            contentNegotiator.start();
//        }
    }
1054464
@Override
    public void start() throws Exception
    {
        try
        {
            reRegisterServices();
        }
        catch ( KeeperException e )
        {
            log.error("Could not register instances - will try again later", e);
        }
        client.getConnectionStateListenable().addListener(connectionStateListener);
    }
652645
@LifecycleStart
  @Override
  public void start() throws Exception
  {
    super.start();

    synchronized (lifecycleLock) {
      Preconditions.checkState(!started, "already started");
      started = true;

      try {
        cleanupStaleAnnouncements();
        registerRunListener();
        pathChildrenCache.start();

        log.info("Started WorkerTaskMonitor.");
        started = true;
      }
      catch (InterruptedException e) {
        throw e;
      }
      catch (Exception e) {
        log.makeAlert(e, "Exception starting WorkerTaskMonitor")
           .emit();
        throw e;
      }
    }
  }
1266502
public void begin() throws HandlerException {
        if (_enabled) {
            try {
                _userTx = TransactionManagerLocator.INSTANCE.getUserTransaction();
                if (_userTx.getStatus() == Status.STATUS_NO_TRANSACTION) {
                    _userTx.begin();
                    _isInitiator = true;
                }
            } catch (SystemException se) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionBeginFailedSystem(se);
            } catch (NotSupportedException nse) {
                throw CommonKnowledgeMessages.MESSAGES.userTransactionBeginFailedNSE(nse);
            }
        }
    }
760385
public void start() {
        if (this.started) {
            throw new IllegalStateException("Cannot start the EventStream because it isn't stopped.");
        }

        final long initialPosition;

        if (this.startingPosition == STREAM_POSITION_NOW) {
            BoxAPIRequest request = new BoxAPIRequest(this.api, EVENT_URL.build(this.api.getBaseURL(), "now"), "GET");
            BoxJSONResponse response = (BoxJSONResponse) request.send();
            JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
            initialPosition = jsonObject.get("next_stream_position").asLong();
        } else {
            assert this.startingPosition >= 0 : "Starting position must be non-negative";
            initialPosition = this.startingPosition;
        }

        this.poller = new Poller(initialPosition);

        this.pollerThread = new Thread(this.poller);
        this.pollerThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
            public void uncaughtException(Thread t, Throwable e) {
                EventStream.this.notifyException(e);
            }
        });
        this.pollerThread.start();

        this.started = true;
    }
1116621
public void init() {
        if (incNestingCount() > 1) {
            return;
        }
        SessionFactory sf = getSessionFactory();
        if (sf == null) {
            return;
        }
        if (TransactionSynchronizationManager.hasResource(sf)) {
            // Do not modify the Session: just set the participate flag.
            setParticipate(true);
        }
        else {
            setParticipate(false);
            LOG.debug("Opening single Hibernate session in HibernatePersistenceContextInterceptor");
            Session session = getSession();
            HibernateRuntimeUtils.enableDynamicFilterEnablerIfPresent(sf, session);
            TransactionSynchronizationManager.bindResource(sf, new SessionHolder(session));
        }
    }
190901
public void init() {
        this.session.getAgenda().getAgendaGroup( "register neighbor" ).setFocus();
        this.session.fireAllRules();
        this.session.getAgenda().getAgendaGroup( "calculate" ).clear();
    }
751249
public void start(){

        try {
            jmsServer.setConfiguration(config);
            jmsServer.setJmsConfiguration(jmsConfig);

            jmsServer.start();

            ConnectionFactory connectionFactory = (ConnectionFactory) jmsServer.lookup("/cf");
            if(connectionFactory == null){
                throw new AsyncException("Failed to start EmbeddedJMS server due to previous errors.");
            }

            consumerConnection = connectionFactory.createConnection();
            receiverSessionPool = new SessionPool("Consumer", consumerConnection);

            producerConnection = connectionFactory.createConnection();
            senderSessionPool = new SessionPool("Producer", producerConnection);
            configureListeners(injector, queueConfigsList);
            started = true;
        } catch (Exception e) {
            throw new AsyncException(e);
        }
    }
380946
public void start() throws Exception
    {
        Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Cannot be started more than once");

        client.createContainers(queuePath);

        getInitialQueues();
        leaderLatch.start();

        service.submit
        (
            new Callable<Void>()
            {
                @Override
                public Void call() throws Exception
                {
                    while ( state.get() == State.STARTED )
                    {
                        try
                        {
                            Thread.sleep(policies.getThresholdCheckMs());
                            checkThreshold();
                        }
                        catch ( InterruptedException e )
                        {
                            // swallow the interrupt as it's only possible from either a background
                            // operation and, thus, doesn't apply to this loop or the instance
                            // is being closed in which case the while test will get it
                        }
                    }
                    return null;
                }
            }
        );
    }
242936
public synchronized void restart() throws IllegalStateException {

        if (this.isShutdown) {
            throw new IllegalStateException("isShutdown==true");
        } else if (this.taskRunnerThread == null) {
            this.taskRunnerThread =
                this.threadFactory.newThread(this.taskRunner);

            this.taskRunnerThread.start();
        } else {
            this.taskQueue.unpark();
        }
    }
356587
public void start() {
    	if(this.isActive)
    		return;
    	
        if (clock == null) {
            throw new IllegalStateException("Clock is not set");
        }

        this.isActive = true;
        
        logger.info("Starting ");
        
        coreThread.activate();
        criticalThread.activate();
        for(int i=0;i<workerThreads.length;i++)
        	workerThreads[i].activate();
        
        for(int i=0;i<criticalWorkerThreads.length;i++)
        	criticalWorkerThreads[i].activate();        
        
        logger.info("Started ");
    }
1307008
public void start()
        throws Exception
    {
        _unavailable=0;
        super.start();
        
        if (!javax.servlet.Servlet.class
            .isAssignableFrom(_class))
        {
            Exception ex = new IllegalStateException("Servlet "+_class+
                                            " is not a javax.servlet.Servlet");
            super.stop();
            throw ex;
        }        

        _config=new Config();
        if (_runAs!=null)
            _realm=_httpHandler.getHttpContext().getRealm();

        if (javax.servlet.SingleThreadModel.class
            .isAssignableFrom(_class))
            _servlets=new Stack();

        if (_initOnStartup)
        {
            _servlet=(Servlet)newInstance();
            try
            {
                initServlet(_servlet,_config);
            }
            catch(Throwable e)
            {
                _servlet=null;
                _config=null;
                if (e instanceof Exception)
                    throw (Exception) e;
                else if (e instanceof Error)
                    throw (Error)e;
                else
                    throw new ServletException(e);
            }            
        }  
    }
1320889
protected function startSession()
    {
        if (@session_status() === \PHP_SESSION_ACTIVE) {
            throw new SessionNotStartedException('Session started already!');
        }

        if (ini_get('session.use_cookies') && headers_sent($file, $line)) {
            throw new SessionNotStartedException(sprintf('Unable to start session, headers already sent by "%s" at line %d.', $file, $line));
        }

        $this->setSessionConfig();

        /*
         | We will start session, if fails
         | we will throw exception to user
         */
        if (!session_start()) {
            throw new SessionNotStartedException('Unable to start session');
        }
    }
1226313
@Override
	public void open() throws IOException, MemoryAllocationException, InterruptedException {
		this.hashJoin.open(this.firstInput, this.secondInput, this.buildSideOuterJoin);
	}
835625
public void start() {
    try {
      if (init) {
        setErrorStatus("Cannot initialize multiple times", null);
        return;
      }
      init = true;
      HttpPost postRequest = setupRequest(new ByteArrayOutputStream(0));
      UploadImageParam.setHeaders(postRequest, journalId, namespaceInfoString,
          epoch, txid, 0, segmentId++, false);

      HttpClient httpClient = new DefaultHttpClient();
      HttpResponse response = httpClient.execute(postRequest);
      if (response.getStatusLine().getStatusCode() == HttpServletResponse.SC_NOT_ACCEPTABLE) {
        throwIOException("Error when starting upload to : " + uri + " status: "
            + response.getStatusLine().toString());
      }

      // get the session id
      for (Header h : response.getAllHeaders()) {
        if (h.getName().equals("sessionId")) {
          sessionId = Long.parseLong(h.getValue());
          break;
        }
      }

      // we must have the session id
      if (sessionId < 0) {
        throw new IOException("Session id is missing");
      }
    } catch (Exception e) {
      setErrorStatus("Exception when starting upload channel for: " + uri, e);
    }
  }
59649
private void runSession() {
		if (!started) {
			logString("Thread Starting");
			completed = false;
			seqNum = getStartSeqNum();
			rtpStack.setNextZrtpSequenceNumber(getStartSeqNum());
			state = ZRTP_STATE_INACTIVE;
			initiator = false;
			hashMode = HashType.UNDEFINED;
			dhMode = KeyAgreementType.DH3K;
			sasMode = SasType.UNDEFINED;
			farEndZID = null;
			farEndH0 = null;
			farEndClientID = "";
			isLegacyClient = false;
			// farEndH1 = null;
			// farEndH2 = null;
			// farEndH3 = null;
			farEndZID = null;
			dhPart1Msg = null;
			dhPart2Msg = null;
			rxHelloMsg = txHelloMsg = commitMsg = null;
			msgConfirm1TX = msgConfirm2TX = null;
			msgConfirm1RX = msgConfirm2RX = null;
			msgErrorTX = null;

			try {
				// TODO: create after algorithm negotiation
				dhSuite.setAlgorithm(KeyAgreementType.DH3K);
				// Initialize the retransmission timer interval
				timerInterval = T1_INITIAL_INTERVAL;
				sendHello();
				started = true;
			} catch (Throwable e) {
				logError("Exception sending initial Hello message: "
						+ e.toString());
				e.printStackTrace();
				completed = true;
			}
			while (!completed) {
				synchronized (lock) {
					try {
						lock.wait();
					} catch (Throwable e) {
						logString("Thread Interrupted E:" + e);
					}
				}
				processQueuedMessages();
			}
			endSession();
			logString("Thread Ending");
		}
	}
671634
protected void prepare() throws IllegalStateException {
        Log.d(TAG, "prepare");
        startLoading();

        this.currentState = State.PREPARING;
        this.mediaPlayer.prepareAsync();
    }