common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsConnector.java [97:187]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.listener = listener;
    }

    /**
     * Called when the Component is initialized
     *
     * @param cc
     * @throws JBIException
     */
    public void init(ComponentContext cc) throws JBIException {
        super.init(cc);
        //should set all ports etc here - from the naming context I guess ?
        if (keyStore == null) {
            keyStore = System.getProperty("javax.net.ssl.keyStore", "");
            if (keyStore == null) {
                throw new IllegalArgumentException("keyStore or system property javax.net.ssl.keyStore must be set");
            }
        }
        if (keyStore.startsWith("classpath:")) {
            try {
                String res = keyStore.substring(10);
                URL url = new ClassPathResource(res).getURL();
                keyStore = url.toString();
            } catch (IOException e) {
                throw new JBIException("Unable to find keystore " + keyStore, e);
            }
        }
        if (keyStorePassword == null) {
            keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword");
            if (keyStorePassword == null) {
                throw new IllegalArgumentException("keyStorePassword or system property javax.net.ssl.keyStorePassword must be set");
            }
        }
        if (listener == null) {
            listener = new SslSocketConnector();
        }
        listener.setHost(host);
        listener.setPort(port);
        listener.setConfidentialPort(port);
        listener.setPassword(keyStorePassword);
        listener.setKeyPassword(keyPassword != null ? keyPassword : keyStorePassword);
        listener.setKeystore(keyStore);
        listener.setWantClientAuth(wantClientAuth);
        listener.setNeedClientAuth(needClientAuth);
        listener.setProtocol(protocol);
        listener.setSslKeyManagerFactoryAlgorithm(keyManagerFactoryAlgorithm);
        listener.setSslTrustManagerFactoryAlgorithm(trustManagerFactoryAlgorithm);
        listener.setKeystoreType(keyStoreType);
        server = new Server();
        BoundedThreadPool btp = new BoundedThreadPool();
        btp.setMaxThreads(getMaxThreads());
        server.setThreadPool(btp);
    }
    
    /**
     * start the Component
     *
     * @throws JBIException
     */
    public void start() throws JBIException {
        server.setConnectors(new Connector[] { listener });
        ContextHandler context = new ContextHandler();
        context.setContextPath("/");
        ServletHolder holder = new ServletHolder();
        holder.setName("jbiServlet");
        holder.setClassName(BindingServlet.class.getName());
        ServletHandler handler = new ServletHandler();
        handler.setServlets(new ServletHolder[] { holder });
        ServletMapping mapping = new ServletMapping();
        mapping.setServletName("jbiServlet");
        mapping.setPathSpec("/*");
        handler.setServletMappings(new ServletMapping[] { mapping });
        context.setHandler(handler);
        server.setHandler(context);
        context.setAttribute("binding", this);
        try {
            server.start();
        }
        catch (Exception e) {
        	logger.warn(e.toString());
            throw new JBIException("Start failed: " + e, e);
        }
    }

    /**
     * stop
     */
    public void stop() throws JBIException {
        try {
            if (server != null) {
                server.stop();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



common/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpsSoapConnector.java [92:182]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		this.listener = listener;
	}

	/**
	 * Called when the Component is initialized
	 *
	 * @param cc
	 * @throws JBIException
	 */
	public void init(ComponentContext cc) throws JBIException {
		super.init(cc);
		//should set all ports etc here - from the naming context I guess ?
        if (keyStore == null) {
            keyStore = System.getProperty("javax.net.ssl.keyStore", "");
            if (keyStore == null) {
                throw new IllegalArgumentException("keyStore or system property javax.net.ssl.keyStore must be set");
            }
        }
        if (keyStore.startsWith("classpath:")) {
            try {
                String res = keyStore.substring(10);
                URL url = new ClassPathResource(res).getURL();
                keyStore = url.toString();
            } catch (IOException e) {
                throw new JBIException("Unable to find keystore " + keyStore, e);
            }
        }
        if (keyStorePassword == null) {
            keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword");
            if (keyStorePassword == null) {
                throw new IllegalArgumentException("keyStorePassword or system property javax.net.ssl.keyStorePassword must be set");
            }
        }
        if (listener == null) {
            listener = new SslSocketConnector();
        }
        listener.setHost(host);
        listener.setPort(port);
        listener.setConfidentialPort(port);
        listener.setPassword(keyStorePassword);
        listener.setKeyPassword(keyPassword != null ? keyPassword : keyStorePassword);
        listener.setKeystore(keyStore);
        listener.setWantClientAuth(wantClientAuth);
        listener.setNeedClientAuth(needClientAuth);
        listener.setProtocol(protocol);
        listener.setSslKeyManagerFactoryAlgorithm(keyManagerFactoryAlgorithm);
        listener.setSslTrustManagerFactoryAlgorithm(trustManagerFactoryAlgorithm);
        listener.setKeystoreType(keyStoreType);
		server = new Server();
        BoundedThreadPool btp = new BoundedThreadPool();
        btp.setMaxThreads(getMaxThreads());
        server.setThreadPool(btp);
	}

	/**
	 * start the Component
	 *
	 * @throws JBIException
	 */
	public void start() throws JBIException {
        server.setConnectors(new Connector[] { listener });
        ContextHandler context = new ContextHandler();
        context.setContextPath("/");
        ServletHolder holder = new ServletHolder();
        holder.setName("jbiServlet");
        holder.setClassName(BindingServlet.class.getName());
        ServletHandler handler = new ServletHandler();
        handler.setServlets(new ServletHolder[] { holder });
        ServletMapping mapping = new ServletMapping();
        mapping.setServletName("jbiServlet");
        mapping.setPathSpec("/*");
        handler.setServletMappings(new ServletMapping[] { mapping });
        context.setHandler(handler);
        server.setHandler(context);
        context.setAttribute("binding", this);
        try {
            server.start();
        }
        catch (Exception e) {
        	logger.warn(e.toString());
            throw new JBIException("Start failed: " + e, e);
        }
	}

	/**
	 * stop
	 */
	public void stop() throws JBIException {
        try {
            if (server != null) {
                server.stop();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



