-
Notifications
You must be signed in to change notification settings - Fork 113
OSGiServlet not working in an enRoute Setup #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this was a problem with support for older OSGi platforms. I wonder if we can put both properties at the same time ? |
Also for older OSGi platforms the new approach should work, if they are compliant to the standard. I think this property might rather be to satisfy a proprietary framework. However, I think there is no problem in adding both properties. |
I don't have any OSGi experience myself unfortunately. Is one of you able to create a PR for this one? |
@benfortuna You seem to have OSGi experience. Any chance you could help out with this one? |
@oliemansm I don't have a specific fix for supporting the HttpWhiteboard service, but perhaps the change applied in #237 (servlet is not automatically registered) could help in that users can register their own servlet using HttpWhiteboard. |
AFAIK the changes in the mentioned PR indeed fix the issue by using standard OSGi annotations instead of the outdated ones from biz.aQute 😊 |
This should be fixed with the recently release 9.1.0 version as mentioned above. |
Hi,
I tried to setup a minimal example on how to use your GraphQL Servlet in a pure enRoute OSGi setup. First I tried to merely include your library and then copy&paste the example code of your Karaf example in my own component.
Unfortunately this didn't work, as the
OsgiGraphQLHttpServlet
wasn't registered via the HttpWhiteboard.I think this might stem from the component properties of
OsgiGraphQLHttpServlet
that are incorrect according to the standard. Instead of usingalias=/graphql
you should use either the new annotations like this@HttpWhiteboardServletPattern("/graphql")
or use the old style property like thisosgi.http.whiteboard.servlet.pattern=/graphql
I've created a small runnable example that you can inspect via Gitpod if you want:
Just cd in to /graphql , type
resolve app
and when maven is finishedrun app/target/debug.jar
Maybe you could change the properties accordingly so that the
OsgiGraphQLHttpServlet
is usable in a plain OSGi environment too.Kind regards,
Thomas
The text was updated successfully, but these errors were encountered: