Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] SPDY NPN without -Xbootclasspath

Quite cool.
Wonder how future proof these techniques are though?


--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Thu, Sep 5, 2013 at 4:00 PM, Eirik Bjørsnøs <eirbjo@xxxxxxxxx> wrote:

Hi,

Investigating SPDY support for JettyConsole (a Maven plugin embedding Jetty into runnable .war-files), I found a way to add SPDY support without setting -Xbootclasspath on the command line.

It involves attaching to the current JVM and then loading a JVM agent.

The agent adds a ClassFileTransformer. When the SSL classes in NPN-boot are loaded, the NPN-boot bytes are returned instead of the JVM's bytes.

Here's the complete implementation of the SPDY plugin for JettyConsole:


The loading of the agent happens in the bootstrap() method here:


And the JVM agent itself is here:


It all seems to work, although I've only tested this on my Mac so far.

I think avoiding the bootclasspath hassle could help increase SPDY adoption. WDTY? Any interest in doing something similar in Jetty? 

Thanks,
Eirik. 

 

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top