-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support for JAX-RS 2.2 Java SE Bootstrapping API #3839
Support for JAX-RS 2.2 Java SE Bootstrapping API #3839
Conversation
d577dee
to
89a66c7
Compare
@jansupol This is only a very, very initial proof-of-concept I maintain in sync with my progress on the API drafts. If nobody objects or already is planned for, I would like to extend it in the next weeks to become a full-monty implementation of the Java SE Bootstrap API. Is that OK for your team or are other people working on this already? |
@mkarg Noone started to work on this yet, since the JAXRS interface (I still do not enjoy the name - Does Bootstrap make more sense?) is not finished. We would welcome your PR, but first, Santiago has worked on some JAX-RS 2.2 features implementation and he will put this code to a separate branch, that expects JAX-RS 2.2. This PR should be placed in that branch as well. |
@jansupol Great to hear, because I already have it halfway done (runs fine with Grizzly, Jetty and JDK already). So I will finish it, add tests and keep it in sync with the ugly-named interface. |
@jansupol Regarding your recent comment on auto-selection of ports, I have two questions: (a) Do you mean auto-selection of port (= range scan), or do you mean reporting the native API's default port (= 80 on Jersey)? If you mean range scan, can you please point me to the code in Jersey that provides a port scanner? |
The range scan would be great, would it not? But I would prefer to leave that functionality optional on the implementation builder and not make that mandatory that by JAX-RS. I just meant a single number, which the implementation can choose. The JAXRS interface implementation should set the port independently on the container implementations, to mandate that port on any (current or future) container the user chooses. I personally favour 8080. |
Five years ago range scan would have been a great addition to Jersey, but with docker being umbiquitus and doing range scan on his own, I think only very few people will have an actual benefit of that at time of publishing Jersey 2.28. OTOH if someone likes to spent the time to add this feature, great, then I will +1 on that PR. :-) If we really want to return a single number instead of getting one provided, then I wonder why Jersey shall select it globally instead of using any existing defaults already existing in the container providers? I mean, why shall we return 8080 in case someone explicitly requests Grizzly and that one has 80, or explicitly requests HTTPS on Jetty and that one picks 8333? That makes no sense to me. So either the default is 8080 defined by the JAX-RS specification, or it is whatever the container decided to use. Or I do not understand the purpose here? |
25af659
to
5b47056
Compare
@jansupol You convinced me. I Just updated the PoC. It now does auto-selection of 80 / 443 dependend of protocol HTTP / HTTPS. More code will follow next week. |
f809d30
to
92182ef
Compare
Supports sixth draft of JAXRS interface:
Tested using Grizzly2, Jetty, Netty, JDK-HTTP, Simple. For SimpleFramework mutual authentication (i. e. enabling SSL client authentication) is not yet implemented. I ran out of time and will look into that in the next days. As requested, this PR now is based on the |
2e3ea37
to
b76a6c3
Compare
@mkarg This is rather large commit., sorry it took me so long to get to it. I had an idea to review all at once, but it seems too difficult. I try to add comments when I got hit by something. |
core-server/src/main/java/org/glassfish/jersey/server/spi/ServerProvider.java
Outdated
Show resolved
Hide resolved
Please do not forget the license headers. |
The more I think about it the more I am convinced that |
I will have to check the actual code what it implies to implement |
a437d4a
to
ede2d60
Compare
License headers and improved Javadocs will follow in a subsequent commit (I planned to do that at last, just wanted to get the actual code correct first). I thought about Regarding you proposal to query the native server instance: This was already existing, see |
fdbfc3f
to
e896a0f
Compare
I will review my code this week. After that I will update Javadocs and licence headers, and squash outdated commits. |
@mkarg I was thinking, the |
@jansupol I would rather slow down with more additions to the JAXRS Bootstrap. For me implementing the 7th draft worked liked a charm for Jersey and a PoC was hacked within 30 minutes in RESTeasy. So maybe it would be a good idea to first merge the 7th draft (+ docs + tests) and collect ideas for a future PR after the vendors are done with implementing the 7th draft? It makes decision easier having something in the hands to discuss about. Such a "post-implementation-PR" could also cover ideas like thread pools and optional support for CDI 2.0 SeContainer (RESTeasy is working an that AFAIK). Besides that, my gut instinct say that Configurable is something different to JAXRS.Configuration (one is the application, the other is the boilerplate; I'd rather not mix it). |
b548735
to
6170709
Compare
@mkarg Please go ahead. If we should ever finish this review, it would be good to have it buildable. |
523dd03
to
d080aa5
Compare
Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
5d8e0a7
to
c7beeda
Compare
@jansupol Rebased Java SE Bootstrap API ontop of branch JAXRS_2_2. I kindly request to continue the review. :-) |
@jansupol What is holding you back from merging this? Anything you want me to change? |
bd09302
to
d74e42b
Compare
This reverts commit 0441f3a. Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
Signed-off-by: Markus KARG <markus@headcrashing.eu>
d74e42b
to
c6a3794
Compare
All requested changes are made. I would be more than happy to see this review being finished and the changes finally merged into the `JAXRS_2_2' branch. Otherwise please tell me what more you want me to change. :-) |
@arjantijms @asoldano @andymc12 Review please. :-) |
@mkarg It looks good. Thank you. |
Implementation of the new Java SE Bootstrapping API of JAX-RS 2.2.