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

Update for Jetty 9.3.0 #823

Merged
merged 1 commit into from
Apr 8, 2016
Merged

Update for Jetty 9.3.0 #823

merged 1 commit into from
Apr 8, 2016

Conversation

arteam
Copy link
Member

@arteam arteam commented Jun 27, 2015

Jetty 9.3.0 is the latest update of Jetty with some API changes.

  • Update InstrumentedConnectionFactory to support instrumentation for Jetty 9.3.
    The update should be backward-compatible with Jetty 9.1 and 9.2, because we only implement a new method.

@arteam
Copy link
Member Author

arteam commented Jun 27, 2015

The obvious downside is that we can't run tests under Java 7, because Jetty 9.3.0 is compiled against Java 8.

@ryantenney
Copy link
Contributor

I'd like to be able to run tests against Jetty 9.2 and Java 7. Any idea how we can make that happen?

This method is declared in `ConnectionFactory` in Jetty 9.3.*.
To be compatible with it, we should have a method with the same
signature.

We can't use a compile-time dependency on Jetty 9.3.*, because
it's compiled against Java 8, but `dropwizard-metrics` against Java 7.

Therefore, we use reflection to access this method.
@arteam
Copy link
Member Author

arteam commented Sep 15, 2015

What do you think about using reflection to access the ConnectionFactory#getProtocols method?
We keep Java 7 compile-time dependency, and in the same time comply with Jetty 9.3.* in runtime.

@arteam
Copy link
Member Author

arteam commented Sep 29, 2015

Ping. @ryantenney, could you take a look, please?

@drallgood
Copy link

Just found this while trying to figure out why my app was failing when I tired to use Jetty 9.3.
Any news when this will be merged?

@jplock
Copy link
Member

jplock commented Apr 6, 2016

@arteam is this good to merge now?

@arteam
Copy link
Member Author

arteam commented Apr 8, 2016

Yes, the patch should be good to merge. Last time I checked, it worked both on Jetty 9.2.* and Jetty 9.3.*.

@jplock
Copy link
Member

jplock commented Apr 8, 2016

And Java7?

@arteam
Copy link
Member Author

arteam commented Apr 8, 2016

I didn't check against Java 7, but the tests passed on Travis CI. I used reflection precisely for the reason to avoid any Java 8 dependency.

@jplock jplock merged commit c5d91b3 into dropwizard:master Apr 8, 2016
@jplock jplock added this to the 4.0.0 milestone Apr 8, 2016
arteam pushed a commit that referenced this pull request Jan 5, 2017
This method is declared in `ConnectionFactory` in Jetty 9.3.*.
To be compatible with it, we should have a method with the same
signature.

We can't use a compile-time dependency on Jetty 9.3.*, because
it's compiled against Java 8, but `codahale-metrics` against Java 6.

Therefore, we use reflection to access this method.

Backport of #823
@arteam arteam mentioned this pull request Jan 5, 2017
@arteam
Copy link
Member Author

arteam commented Jan 5, 2017

I've created #1038 to backport this feature to the 3.2 branch. For the 4.0.0 branch we can actually just avoid reflection and just implement a new method.

@arteam arteam deleted the jetty93-update branch January 5, 2017 12:55
arteam added a commit that referenced this pull request Jan 5, 2017
This method is declared in ConnectionFactory in Jetty 9.3.*.
To be compatible with it, we should have a method with the same
signature.

We can't use a compile-time dependency on Jetty 9.3.*, because
it's compiled against Java 8, but codahale-metrics against Java 6.

Therefore, we use reflection to access this method.

Backport of #823
@arteam
Copy link
Member Author

arteam commented Jan 5, 2017

The implementation for 4.0.0 is tracked in #1039.

@arteam arteam modified the milestones: 4.0.0, 3.2.0 Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants