Jacob, Just to backup Joakim, there might be a use-case for NestedConnector, but I don't think yours is it.
NestedConnector was added when we had users that wanted the semantics of the Jetty Servlet container, but were forced by company policy to deploy within WebSphere. If somebody really has that kind of requirement again, we could consider putting it back in. As for your use-case, it is more normal to have JAX-RS implementation inside jetty, so that the httpservletrequest and httpservletresponse objects seen are actually wrappers over jetty. If you want to compose one JAX-RS resource from others, then I don't think that embedding a jetty instance inside JAX-RS is really the right way to go. Somebody with more JAX-RS knowledge may tell you if it can be done using JAX-RS mechansims. If you really want to go back to HTTP, then using the a HTTP connector or LocalConnector is one option. cheers On 20 April 2016 at 09:42, Joakim Erdfelt <[email protected]> wrote: > 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 > -- Greg Wilkins <[email protected]> CTO http://webtide.com
_______________________________________________ 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
