[
https://issues.apache.org/jira/browse/ARIES-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371233#comment-16371233
]
Carlos Sierra commented on ARIES-1785:
--------------------------------------
Hi Stefan,
If you need your application to wait for the extension and want the extension
to register only to applications that wait for it, you could do something like
this (using the notation you used in your example above):
the application can carry the property:
{code:java}
osgi.jaxrs.extension.select=(extension.security=true){code}
and the extension can carry the properties:
{code:java}
extension.security=true
osgi.jaxrs.application.select=(osgi.jaxrs.extension.select=\(extension.security\=true\)){code}
(note the escaping characters). This way the extension will only attach to
applications that require it and applications requiring it will not be
processed until the extension is up. Your application with no
_osgi.jaxrs.extension.select_ property will get no extension.
However, If you don't need the application to wait for the extension (it is not
required for it to work), I would say your best way to go would be setting a
_JAX_RS_APPLICATION_SELECT_ property to your extension.
{code:java}
JAX_RS_APPLICATION_SELECT=(requires.security=true){code}
then, when you want an application to use your extension, you can set a property
{code:java}
requires.security=true{code}
to your application. The application that does not carry the property will not
get the filter.
I hope one of these scenarios suits you needs.
Bests.
Carlos.
> Application without JAX_RS_EXTENSION_SELECT fetchs Extension
> ------------------------------------------------------------
>
> Key: ARIES-1785
> URL: https://issues.apache.org/jira/browse/ARIES-1785
> Project: Aries
> Issue Type: Bug
> Components: jax-rs-whiteboard
> Affects Versions: jax-rs-whiteboard-1.0.0
> Reporter: Stefan Bischof
> Priority: Major
> Attachments: test.txt
>
>
> Hi,
> an application without any JAX_RS_EXTENSION_SELECT property fetchs a
> extention.
> see the attached test for more information.
> (could be paste into org.apache.aries.jax.rs.itests test.JaxrsTest.java)
> regards
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)