[jira] [Commented] (ARIES-1785) Application without JAX_RS_EXTENSION_SELECT fetchs Extension

2018-02-21 Thread Carlos Sierra (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371248#comment-16371248
 ] 

Carlos Sierra commented on ARIES-1785:
--

I pushed a new test for the first use case I described above.

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)


[jira] [Commented] (ARIES-1785) Application without JAX_RS_EXTENSION_SELECT fetchs Extension

2018-02-21 Thread Carlos Sierra (JIRA)

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


[jira] [Commented] (ARIES-1785) Application without JAX_RS_EXTENSION_SELECT fetchs Extension

2018-02-21 Thread Stefan Bischof (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371112#comment-16371112
 ] 

Stefan Bischof commented on ARIES-1785:
---

Hi Carlos,

the RSWhiteboard should be able to handle this scenario: 

I have a extension "BasicAuthSecurityFilter" with the component-property 
"extension.security=true"

Then I would add an Applications that should uses this BasicAuthSecurityFilter 
"osgi.jaxrs.extension.select=(extension.security=true)"

But I have a second Application that *should not use BasicAuthSecurityFilter*.

if I do "osgi.jaxrs.extension.select=(extension.security=*false*)" the 
Application will not activate
if I do not use any "osgi.jaxrs.extension.select" it will  have the 
BasicAuthSecurityFilter.


Is there any option at the moment?

regards 
Stefan


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


[jira] [Commented] (ARIES-1785) Application without JAX_RS_EXTENSION_SELECT fetchs Extension

2018-02-20 Thread Carlos Sierra (JIRA)

[ 
https://issues.apache.org/jira/browse/ARIES-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16370634#comment-16370634
 ] 

Carlos Sierra commented on ARIES-1785:
--

Hi Stefan,

as far as I understand this is the expected behaviour. 
_JAX_RS_EXTENSION_SELECT_ allows an application to create a dependency to an 
extension, so the application won't be processed until the extensions are 
available. So applications with _JAX_RS_EXTENSION_SELECT_ must _wait_ for their 
selected extensions to be present.

On the other hand, extensions and resources, can target a particular 
application using _JAX_RS_APPLICATION_SELECT._ At the moment, extensions that 
do not target a particular application are applied to all applications, while 
resources that do not target a particular application are applied to the 
default application.

So an application without _JAX_RS_EXTENSION_SELECT_ does not need to wait for 
any extension to be present.

Is this consistent with what you get?

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)