You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Xander Uiterlinden (Created) (JIRA)" <ji...@apache.org> on 2011/12/29 17:11:33 UTC

[jira] [Created] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Allow passing of resource properties to a resource handler for use with resource adapters.
------------------------------------------------------------------------------------------

                 Key: FELIX-3292
                 URL: https://issues.apache.org/jira/browse/FELIX-3292
             Project: Felix
          Issue Type: Improvement
          Components: Dependency Manager
            Reporter: Xander Uiterlinden


Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
or the encoding. 

At the moment we're working our way around it by creating implementing a custom URLHandler. 

It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
untyped set of properties. When provided these will be injected into the resource adapter implementation.

I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Xander Uiterlinden (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178403#comment-13178403 ] 

Xander Uiterlinden commented on FELIX-3292:
-------------------------------------------

I agree with your comments. Merging the properties into a single set is makes more sense and addresses nearly all other comments. 
                
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>            Assignee: Marcel Offermans
>              Labels: patch
>         Attachments: resourceadapterpatch2.patch, resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Xander Uiterlinden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xander Uiterlinden updated FELIX-3292:
--------------------------------------

    Attachment: resourceadapterpatch2.patch

Find enclosed a revised patch which merges the standard and custom resource properties.
                
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>            Assignee: Marcel Offermans
>              Labels: patch
>         Attachments: resourceadapterpatch2.patch, resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Marcel Offermans (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178346#comment-13178346 ] 

Marcel Offermans commented on FELIX-3292:
-----------------------------------------

A couple of comments after reviewing this:
* ResourceHandler: You define the RESOURCE_PROPERTIES_FILTER constant with the exact same value as the FILTER one: those should probably be different, right?
* Do we need two different filter conditions, or can we merge the properties into a single set (having the default URL, host, path, port and protocol always available and extra properties with non-colliding names as extras)?
* ResourceHandler: Why only have an added(...) method with a Dictionary, I think that if these properties are derived from the resource, we should not assume they remain the same if the resource changes, and it probably also makes sense to provide them when the resource is removed. We can consider deprecating the methods that do not provide a Dictionary.
* Question: What does "propagate" mean now? Related to the question above (if we should merge the properties into one set) we need to specify what happens to these extra properties. Are they propagated or not?
* Question: From the patch it seems you cannot combine the RESOURCE_PROPERTIES_FILTER and the FILTER (only one of them is used when registering the service). Is that by design? I think it does make sense to be able to combine them, btw.
* I would remove the signature for callbacks of type "Component, Object, Object" and "Object, Object". We don't provide a similar signature for other dependencies either.
                
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>            Assignee: Marcel Offermans
>              Labels: patch
>         Attachments: resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Marcel Offermans (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Offermans reassigned FELIX-3292:
---------------------------------------

    Assignee: Marcel Offermans
    
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>            Assignee: Marcel Offermans
>              Labels: patch
>         Attachments: resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Xander Uiterlinden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xander Uiterlinden updated FELIX-3292:
--------------------------------------

    Attachment: resourcepatch.patch

patch introducing the possibility to use resource properties with resource adapters.
                
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>              Labels: patch
>         Attachments: resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FELIX-3292) Allow passing of resource properties to a resource handler for use with resource adapters.

Posted by "Marcel Offermans (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Offermans resolved FELIX-3292.
-------------------------------------

    Resolution: Fixed

Resolving the issue after committing the patch. Xander, please review if you agree with the small changes I made while applying the patch.
                
> Allow passing of resource properties to a resource handler for use with resource adapters.
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3292
>                 URL: https://issues.apache.org/jira/browse/FELIX-3292
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Xander Uiterlinden
>            Assignee: Marcel Offermans
>              Labels: patch
>         Attachments: resourceadapterpatch2.patch, resourcepatch.patch
>
>
> Currently we're using the dependency manager in our project. A feature we extensively use is the resource adapter.
> The resource adapter service gets access to a resource through the abstraction of a URL. This is a nice abstraction
> but raises challenges whenever an implementation requires more properties of the resource, e.g. the last modification date
> or the encoding. 
> At the moment we're working our way around it by creating implementing a custom URLHandler. 
> It would be nicer if the resource adapter could be provided with a set of optional properties. My suggestion would
> be to extend the added(URL resource) method of the ResourceHandler with an additional argument holding a
> untyped set of properties. When provided these will be injected into the resource adapter implementation.
> I'll attach a patch to this issue with the implementation of this feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira