Yow! The Async I/O requirements of Servlet 3.1 alone would make this kind of use case stupidly expensive. Think dual thread pools, with I/O backpressure, and cross-thread coordination in order to even support the basics of HttpServletRequest and HttpServletResponse. And that's even if you don't use Async I/O or Async Processing.
Why not just use a HttpClient and connect back into your JAX-RS endpoint in a normal fashion? You still have some Async Processing coordination to worry about, but that's been solved (see MiddleManServlet, AsyncProxyServlet, etc). If you don't want to expose the JAX-RS endpoint publicly, then you could either setup a loopback only @named ServerConnector, or a @named LocalConnector to your JAX-RS webapp using @named virtualhosting configuration in front of it. Joakim Erdfelt / [email protected] On Tue, Apr 19, 2016 at 4:29 PM, Jacob Carter <[email protected]> wrote: > Sorry if I have a JAX-RS resource from which I want to pass the > httpservletrequest and httpservletresponse to an embedded Jetty instance, > is this possible and if so, how would it work? > > On Wed, 20 Apr 2016, 00:25 Joakim Erdfelt, <[email protected]> wrote: > >> If you are using Jetty across the board, then you have no need for the >> NestedConnector. >> >> Or am I missing something about your use case? >> >> Joakim Erdfelt / [email protected] >> >> On Tue, Apr 19, 2016 at 4:22 PM, Jacob Carter <[email protected]> >> wrote: >> >>> Would this be possible if the embedded jetty instances were being >>> created inside a running jetty instance, instead of say Tomcat? >>> >>> We use Jetty during development to run the main server, and then deploy >>> to Tomcat for production, however I don't see any issues with us moving to >>> using Jetty across the board. >>> >>> On Wed, 20 Apr 2016, 00:17 Joakim Erdfelt, <[email protected]> wrote: >>> >>>> So you are using Jetty inside another non-jetty servlet container? >>>> >>>> With HTTP/2, Servlet 3.1, and Async I/O all conspiring against this >>>> concept in different ways, this doesn't seem possible anymore. >>>> >>>> >>>> Joakim Erdfelt / [email protected] >>>> >>>> On Tue, Apr 19, 2016 at 4:15 PM, Jacob Carter <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> They are used to pass through requests from the main servlet container >>>>> to embedded jetty instances, which are dynamically created/destroyed >>>>> during >>>>> runtime. >>>>> >>>>> On Wed, 20 Apr 2016, 00:12 Joakim Erdfelt, <[email protected]> wrote: >>>>> >>>>>> Why are you using NestedConnector? >>>>>> >>>>>> >>>>>> Joakim Erdfelt / [email protected] >>>>>> >>>>>> On Tue, Apr 19, 2016 at 4:09 PM, Jacob Carter <[email protected] >>>>>> > wrote: >>>>>> >>>>>>> Hi, I'm currently upgrading a project to use Jetty 9 from Jetty 8, >>>>>>> however I'm unable to find the class NestedConnector or any references >>>>>>> to >>>>>>> alternatives I could use. Can anyone help? Thanks in advance. >>>>>>> >>>>>> _______________________________________________ >>>>>>> jetty-users mailing list >>>>>>> [email protected] >>>>>>> To change your delivery options, retrieve your password, or >>>>>>> unsubscribe from this list, visit >>>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> jetty-users mailing list >>>>>> [email protected] >>>>>> To change your delivery options, retrieve your password, or >>>>>> unsubscribe from this list, visit >>>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>>> >>>>> >>>>> _______________________________________________ >>>>> jetty-users mailing list >>>>> [email protected] >>>>> To change your delivery options, retrieve your password, or >>>>> unsubscribe from this list, visit >>>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>>> >>>> >>>> _______________________________________________ >>>> jetty-users mailing list >>>> [email protected] >>>> To change your delivery options, retrieve your password, or unsubscribe >>>> from this list, visit >>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >>> >>> _______________________________________________ >>> jetty-users mailing list >>> [email protected] >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >> >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users > > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
