You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2010/10/08 15:51:30 UTC

[jira] Created: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

Add a (hidden) way to retrieve a local URL for a given bundle URL
-----------------------------------------------------------------

                 Key: FELIX-2645
                 URL: https://issues.apache.org/jira/browse/FELIX-2645
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: framework-3.0.3
            Reporter: Guillaume Nodet
            Assignee: Guillaume Nodet


This is actually very important to support libraries that need to do class-path scanning.

A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall reopened FELIX-2645:
------------------------------------


Looking at this in more detail, I think it can be implemented by mapping the bundle URL back into the local URL at the point of return. I want to investigate it more. Perhaps we should also try to push back in the OSGi Alliance to not have this differentiate between Bundle and ClassLoader entry points.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall reopened FELIX-2645:
------------------------------------


The last patch is broken since it overrides getResources() in the pre-Java5 class loader. I had some doubts about other aspects of the patch too. I will attach a proposed patch. One thing is clear, though, depending on this level of implementation detail is bound to fail in the future.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919292#action_12919292 ] 

Richard S. Hall commented on FELIX-2645:
----------------------------------------

Given the Felix framework's longstanding history of trying to avoid containerisms, it seems somewhat bad form to create an issue that proposes one and immediately commit and resolve it without discussing it.

I've modified your patch to make the public facing class/method package private, so you should use reflection and setAccessible() to access this rather than exposing it as public API from the framework.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Guillaume Nodet resolved FELIX-2645.
------------------------------------

    Resolution: Fixed

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
Committed r1021267


> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall updated FELIX-2645:
-----------------------------------

    Attachment: FELIX-2645.txt

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>         Attachments: FELIX-2645.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919749#action_12919749 ] 

Guillaume Nodet commented on FELIX-2645:
----------------------------------------

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
Committed r1021270


> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall updated FELIX-2645:
-----------------------------------

    Fix Version/s:     (was: framework-3.2.0)
                   framework-3.0.5

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.0.5
>
>         Attachments: FELIX-2645.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall resolved FELIX-2645.
------------------------------------

    Resolution: Fixed

I refactored the patch to convert bundle URLs to local URLs at the point of return to avoid the need for a ThreadLocal and anonymous inner class.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Guillaume Nodet resolved FELIX-2645.
------------------------------------

    Resolution: Fixed

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Richard S. Hall closed FELIX-2645.
----------------------------------

    Resolution: Fixed

I applied the patch. Closing this, hopefully for the last time.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>         Attachments: FELIX-2645.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921374#action_12921374 ] 

Guillaume Nodet commented on FELIX-2645:
----------------------------------------

Yeah, I missed that.  Your new patch looks good to me.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>         Attachments: FELIX-2645.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Guillaume Nodet resolved FELIX-2645.
------------------------------------

       Resolution: Fixed
    Fix Version/s: framework-3.2.0

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Guillaume Nodet reopened FELIX-2645:
------------------------------------


The new modification is a bit problematic to me, as with the previous patch, I could change the behavior if I wanted, whereas now, all the URLs returned by the API aren't transformed and I have no way to change that.

I'd like to refactor it a bit to extract the transformation of a list of urls into a method and re-introduce a method useLocaUrls() to make it easier to customize the behavior.

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-2645) Add a (hidden) way to retrieve a local URL for a given bundle URL

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

Guillaume Nodet reopened FELIX-2645:
------------------------------------


As discussed on the dev list, i'm gonna add a org.apache.felix.jarurls property that will be later changed into the org.osgi when properly standardized in 4.3

> Add a (hidden) way to retrieve a local URL for a given bundle URL
> -----------------------------------------------------------------
>
>                 Key: FELIX-2645
>                 URL: https://issues.apache.org/jira/browse/FELIX-2645
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.3
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-3.2.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> This is actually very important to support libraries that need to do class-path scanning.
> A better solution will certainly come from the OSGi alliance in 4.3, but in the mean time, there's no way to do that in Felix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.