Hi all,
I have been trying to get Tyrus to work in a plain OSGi environment
(Apache Felix).
Although all Tyrus modules are OSGi bundles, there are several problems
that make it impossible to use at this moment. I hope we work towards a
solution (and I'm happy to help).
I started by trying to get the servlet filter container working. For
this you would need a HTTP Service implementation that supports Servlet
3.0 because it needs the "upgrade" method. Grizzly would be a potential
possibility, but has it's own problems to be used in OSGi. For now I
decided this is not the way to go, but if anyone has better experiences
with this I would be happy to know.
Next I tried bootstrapping a Server myself. Some weird class loading
gets in the way here, but I guess this should not be too difficult to
fix.
The org.glassfish.tyrus.container.grizzly.GrizzlyEngine class should be
loaded, but this class is not imported. Instead some weird classloading
from other (nested?) bundles is tried, but this fails although I have
the grizzly container bundle installed. I understand a normal
Import-Package is not possible because this would require Grizzly even
if the Servlet Filter Container is used. Why not use an optional
import? This is never ideal, but fit for situations like this.
Before I start making code changes etc. I would like to discuss the
best way to go forward. I might just be looking at the wrong place :)
Cheers,
Paul