>>>>> Steinar Bang <sb@dod.no>:
>>>>> Jean-Baptiste Onofré <jb@nanthrax.net>:
>> Not using Jersey but cxfrs.
>> I can add this new example using jersey.
> If you want, and tell me where to put it, I can whip up an example and
> provide a pull request?
[snip!]
> Alternatively this one with the REST service implemented in a servlet
> replaced with a Jersey resource?
> https://github.com/steinarb/whiteboard-web-and-api-karaf-demo
This is the version I made a Jersey demo from.
> The latter example has a very simple plain javascript app embdedded in
> an index.html file. This can easily be replaced by a webpack'd react.js
> application if of interest.
> The latter example is already split into two separate bundles. To make
> things really interesting it would be good to delegate the actual
> counting into an OSGi service that can be injected into the Jersey
> resources, making it have a total of 4 bundles (an API bundle defining
> the service, a bundle implementing the service in a DS component, a
> webapi bundle using Jersey and injecting the service from the DS
> component into Jersey resources, and a webgui bundle (that can be
> changed into a react.js app).
This is what I did. The repo for the demo is here:
https://github.com/steinarb/jersey-demo
Here is a description of the demo and how the essential parts work:
https://steinar.bang.priv.no/2018/08/03/use-jersey-to-provide-rest-apis-from-karaf-applications/
|