Hi,

This email is with reference to the mail with heading “[MSS] [Carbon 5]
[netty-http] JAX-RS Engine implementation”

When deploying a JAX-RS artifact in netty-http service, first we need to
discover all the JAX-RS resource classes inside the artifact and initialise
them. For that, following options are there,

   1. Scan all the classes in the package. (low performance but easy for
developers)

   2. Using a descriptor file that is packaged and lists the resource
classes

   3. Using a descriptor to specify a package/s that contains resource
classes

   4. Using a subclass of Application [1]



Further, if/when OSGi bundles are made from the resource classes by the
developers, whiteboard pattern can be enforced by allowing the resource
class instances to be registered as OSGi services that will be discovered
by the JAX-RS engine. Here we have two options.

   4.1 Allow to register the OSGi services of the resource classes under a
known key. (violates the OSGi best practice of using the class name as the
key)

   4.2 Allow to register the OSGi services of the resource classes under
any key but with a known service property set to a known value to be able
to filter the registered OSGI service by the JAX-RS engine.

What do you think about these approaches?

[1] https://docs.oracle.com/javaee/6/api/javax/ws/rs/core/Application.html

Thank you.

-- 
Samiyuru Senarathne
*Software Engineer*
Mobile : +94 (0) 71 134 6087
[email protected]
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to