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

Upgrade to Jetty 9.2.0 #506

Merged
merged 2 commits into from
Jun 2, 2014
Merged

Upgrade to Jetty 9.2.0 #506

merged 2 commits into from
Jun 2, 2014

Conversation

joschi
Copy link
Member

@joschi joschi commented Dec 27, 2013

Jetty 9.1.x and higher introduce some nice features like support for Servlet API 3.1 and Websockets. This PR adds support for Jetty 9.2.0 to Metrics.

@ryantenney
Copy link
Contributor

If I'm not mistaken, this makes it compatible with both Jetty 9.0 and 9.1?

@joschi
Copy link
Member Author

joschi commented Dec 28, 2013

It should at least compile with Jetty 9.0 and 9.1 but there have been some changes in the HttpChannelState.State (9.0.7.v20131107 vs. 9.1.0.v20131115) which will probably lead to some wrong metrics (e. g. HttpChannelState.State.REDISPATCHED should be accounted for in Jetty 9.0).

The alternative to upgrading metrics-jetty9 is creating a separate module for Jetty 9.1 which is almost identical except for the (transitive) dependencies.

@joschi
Copy link
Member Author

joschi commented Feb 7, 2014

Reading issue #521 it probably makes most sense to introduce an additional module metrics-jetty91 for supporting Jetty 9.1, even if that means having to maintain some duplicate code.

@joschi joschi changed the title Upgrade to Jetty 9.1.1 Upgrade to Jetty 9.2.0 Jun 1, 2014
@joschi
Copy link
Member Author

joschi commented Jun 1, 2014

I've reorganized the PR.

The original module metrics-jetty9 (compatible with Jetty 9.0) has been renamed to metrics-jetty9-legacy and the new module is called metrics-jetty9 (compatible with Jetty 9.1 and higher).

@cemo
Copy link

cemo commented Jun 2, 2014

@ryantenney This will be another big step after Jersey 2 support. Any chance to be merged?

ryantenney added a commit that referenced this pull request Jun 2, 2014
@ryantenney ryantenney merged commit 32f19d5 into dropwizard:master Jun 2, 2014
@ryantenney
Copy link
Contributor

Things have been a bit hectic so I hadn't had a chance to review this. Thanks @joschi!

@ryantenney ryantenney added this to the 3.1.0 milestone Jun 2, 2014
@joschi joschi deleted the jetty-9.1 branch June 2, 2014 15:51
@paskos
Copy link

paskos commented Jun 6, 2014

I'm using jetty 9.2.0.v20140526 and metrics-jetty9 version 3.0.2
I get
java.lang.NoSuchMethodError: org.eclipse.jetty.server.HttpChannelState.isDispatched()Z
at com.codahale.metrics.jetty9.InstrumentedHandler$1.onComplete(InstrumentedHandler.java:142)

Do you have a timeline for the fix or a patch I can implement ?

@ryantenney
Copy link
Contributor

This is the patch you're looking for. I expect to release it as 3.1.0 in July.

@paskos
Copy link

paskos commented Jun 6, 2014

Thanks, any advice on how to mitigate while I wait for july's release ?

@paskos
Copy link

paskos commented Jun 6, 2014

Sorry I didn't read the code. I'll gasp copy/paste the changes into a class in my project and I'll delete ir in july.

@ryantenney
Copy link
Contributor

Assuming you're using maven, I'd advise cloning the git repository, mvn install it into your local maven repo and change your project's dependency on all metrics modules to version 3.1.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants