>>>>> Jean-Baptiste Onofré <j...@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?

Basically this Counter example with Jersey instead of implementing the
REST service directly in a servlet (and the packages switched to
something appropriate for karaf examples):
 https://github.com/steinarb/frontend-karaf-demo

That would demonstrate in addition to Jersey:
 - http whiteboard with DS
 - serving a react.js application from a DS component karaf, packaged
   with webpack into a bundle.js file

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

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).

Reply via email to