Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate jetty dependencies into a single package #440

Closed
wants to merge 1 commit into from

Conversation

dsyer
Copy link
Contributor

@dsyer dsyer commented Jun 27, 2016

The servlet and request adapters have moved to the "servlet" package.
The only dependency they had on jetty was conditional anyway, so
the condition was also modified to not even require jetty on the
classpath.

See gh-407. Not a complete modularization yet, but splits up the
servlet-only stuff from the jetty server.

The servlet and request adapters have moved to the "servlet" package.
The only dependency they had on jetty was conditional anyway, so
the condition was also modified to not even require jetty on the
classpath.

See wiremockgh-407. Not a complete modularization yet, but splits up the
servlet-only stuff from the jetty server.

private boolean isPresent(String className) {
try {
ClassUtils.getClass(className);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used commons-lang here (it was on the classpath anyway). I guess it could be done without that dependency if needed.

@tomakehurst
Copy link
Member

As I mentioned on the other thread, this is against master which is frozen currently.

Most of the work to isolate Jetty has already been done on the 2.0-beta branch (which is where all the current activity is).

@dsyer
Copy link
Contributor Author

dsyer commented Jun 28, 2016

Sorry, I didn't realize. Is this redundant then?

@tomakehurst
Copy link
Member

The branch pretty much has these parts covered I think. The Servlet API and Jetty bits are all in their own packages and there's an HttpServerFactory abstraction as an entry point.

The config object doesn't expose a setter for the factory yet, so that probably needs to change. I suspect creating another factory impl isn't as simple as it might be either e.g. degrading gracefully when fault injection isn't available, but it should be possible to do it I think.

@dsyer
Copy link
Contributor Author

dsyer commented Jun 28, 2016

It looks like the basic outline of the change in this PR could still apply to 2.0-beta (the servlet is not jetty-specific). Maybe I'll re-work it. Need to check my PoC still works with 2.0 first.

@dsyer
Copy link
Contributor Author

dsyer commented Jun 28, 2016

See #442

@dsyer dsyer deleted the jetty-isolation branch June 29, 2016 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants