问题描述:

I'm converting an application to an OSGi environment.

This application uses asynchronous servlets (so Servlet 3.0.0+) to detach the incoming requests from their thread, and queue the requests.

As far as I can see, all servlet bridged Felix packages use servlet 2.x, so I can not use servlet 3.0 specific stuff.

Is that true? Is there any way to use asynchronous servlets in Felix? If not, is it

planned?

网友答案:

I've tried both Felix and Equinox.

Felix turned out to be pretty easy, it's mostly a matter of injecting the Servlet 3.0 package to the framework, from then on there aren't any servlet 2.0 dependencies.

Note that the examples on the felix site aren't completely up to date.

Anyway: I've shared an example on github, maybe it's useful for somebody:

https://github.com/flyaruu/felix-bridge

网友答案:

As an alternative to a servlet bridge it might be worth looking at Eclipse Virgo. The latest release of that currently includes Tomcat 7 and I believe the 3.5 release will use Jetty 8, so that would give you your servlet 3.0 support in an OSGi environment.

相关阅读:
Top