Hi all,

I have some questions about the "Additional JAX-RS types" section of the
JAX-RS-Services RFC (rfc-217).

5.2 Additional JAX-RS types:
…​
*"Extensions should provide an osgi.jaxrs.application.select property with
a filter that will match application to which this extensions will be
registered. If no such filter is provided the extension will affect the
default application." *
…​


5.2.5 Depending on Extension Services:


*"When writing and configuring a JAX-RS resource or extension it is
possible for one extension to depend on another. For example a JAX-RS
resource may have a dependency upon a MessageBodyWriter to provide JSON
serialization, or a ContainerRequestFilter may depend on a ContextResolver
to provide injected configuration.*


*In these cases it is necessary to express a dependency on the existence of
an extension within the JAX-RS container. This can be expressed on any
JAX-RS whiteboard service using the osgi.jaxrs.extension.select property.
This property has type String+ and contains a list of LDAP filters. These
filters will be run against the service properties of each extension
service registered with the container. If all of the supplied filters pass
then the whiteboard service will registered. This extension checking should
be done per Application.*
*If at some point later a necessary extension service dependency becomes
unavailable then the whiteboard service will become ineligible for
inclusion in the JAX-RS container until a suitable replacement is found."*


Questions:

   - Is there a way to register extension services without actively adding
   them to an application (just have them ready to use for those who need
   them)?
   - Is it possible to use an extension service from an application that
   doesn’t match the extension service’s osgi.jaxrs.application.select filter?
   - The "This extension checking should be done per Application" remark
   shoud that also apply to the default application? Sounds ok to me for
   JAX-RS applications that are registered as such but for the default
   application this is kind of strange as a single resource depending on an
   unavailable extension could make the whiteboard go down for all JAX-RS
   resources (that are not part of an application)? I think for the default
   application just excluding the resource with unstatisfied dependencies
   would be better than taking the default application down.

Regards,
Bram
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to