Giter Site home page Giter Site logo

Comments (3)

jkutner avatar jkutner commented on August 22, 2024

@tbf2000 that seems like something we could do. How similar is the interface for each connector?

If you're interested in to prototyping it this is a good place to start.

from webapp-runner.

 avatar commented on August 22, 2024

The interface of the APR connector is no challenge. You can just set instatiate it using the apr-specific classname:

	String connectorClassName = tomcatNative ? "org.apache.coyote.http11.Http11AprProtocol"
			: "org.apache.coyote.http11.Http11NioProtocol";
	Connector httpConnector = new Connector(connectorClassName);

But before you do that, you have to add the AprLifecycleListener to the Tomcat instance:

	LifecycleListener[] lifecycleListeners = tomcat.getServer().findLifecycleListeners();
	AprLifecycleListener aprLifecycleListener = null;
	if (null != lifecycleListeners) {
		for (LifecycleListener lifecycleListener : lifecycleListeners) {
			if (lifecycleListener instanceof AprLifecycleListener) {
				aprLifecycleListener = (AprLifecycleListener) lifecycleListener;
			}
		}
	}
	if (null == aprLifecycleListener) {
		aprLifecycleListener = new AprLifecycleListener();
		tomcat.getServer().addLifecycleListener(aprLifecycleListener);
	}
	aprLifecycleListener.setUseAprConnector(true);
	aprLifecycleListener.setSSLEngine("off");
	aprLifecycleListener.setUseOpenSSL(false);

For "nio2", I do not know, but I do not expect any surprises.

from webapp-runner.

Malax avatar Malax commented on August 22, 2024

Hello! Since this is an old issue and many things have changed since it was opened I will close it for now. Feel absolutely free to re-open it if it is still relevant so we can work on it! :)

from webapp-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.