You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2008/10/09 16:32:44 UTC

[jira] Created: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

Allow URLStreamHandler services to override built-in handlers. 
---------------------------------------------------------------

                 Key: FELIX-756
                 URL: https://issues.apache.org/jira/browse/FELIX-756
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: felix-1.2.2
            Reporter: Karl Pauls


In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 

It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Commented: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641335#action_12641335 ] 

Karl Pauls commented on FELIX-756:
----------------------------------

I don't think we should use the felix.strict.osgi property for this. It was used for other features (but it is not used in the current trunk anymore). I'd prefer to always allow overriding built-in handlers. This way we are at least consistent. Anybody has a better idea?

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Assigned: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

Karl Pauls reassigned FELIX-756:
--------------------------------

    Assignee: Karl Pauls

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Closed: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

Karl Pauls closed FELIX-756.
----------------------------


> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: felix-1.4.0
>
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Commented: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645233#action_12645233 ] 

Karl Pauls commented on FELIX-756:
----------------------------------

Don't bother with the system property. Starting with revision 711578, the trunk will override the built-in handlers by default. Please don't forget to test and close this issue if it works for you.

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: felix-1.4.0
>
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Commented: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641332#action_12641332 ] 

Pierre De Rop commented on FELIX-756:
-------------------------------------

Here are our use case: we have our http container bundle which provides an URLStreamHandlers service for protocol http/https.
Hence, when an http application (WAR) uses the jdk java.net.HttpURLConnection, our http container is able to take control over the
protocol and sockets (using URLStreamHandler service).

As you suggested, we could provide some classes in the classpath of the jvm (with java.protocol.handler.pkgs properties).
but this is a big deal for us because we have to expose in the classpath some classes from our http container bundle (and from other dependent bundles).
in other words, it's not easy for us to "unbundle-ize" our http container quickly.

On the other hand, I noticed that there is a property in Felix called
felix.strict.osgi: What is exactly the impact of setting this property to false ?

Would it be acceptable/possible, when this property is set to false, to
enable the http/https protocols for URLStreamHandler service ?


> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Commented: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

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

Yes, we just recently removed the "strict" property from the trunk, since we removed the last feature than depended on it. It is not clear if this should be controlled by a property, since it does open a security hole in the general case, but we can implement the capability first before deciding how to control it.

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Updated: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

Karl Pauls updated FELIX-756:
-----------------------------

    Fix Version/s: felix-1.4.0

O.k., for the time being I will make it so that we allow overriding of the built-in handlers. 

We will first see whether there is a service for the protocol and if so use that one else, we try to lookup a built-in one as we do now. This includes the possibility to add locations to the default locations. What changes is that we first look at the services. 

I'll try to get this done in time for the 1.4.0 release. 

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: felix-1.4.0
>
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Resolved: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

Karl Pauls resolved FELIX-756.
------------------------------

    Resolution: Fixed

If you start felix with:

-Dfelix.service.urlhandlers.override=true 

(a system property) then overriding should work with the current trunk. Please test this issue and close it if it is working for you. This will make it into 1.4.0 so we need feedback fast if it is not working for you. 

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: felix-1.4.0
>
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Issue Comment Edited: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

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

rickhall edited comment on FELIX-756 at 10/21/08 7:42 AM:
-----------------------------------------------------------------

Yes, we just recently removed the "strict" property from the trunk, since we removed the last feature than depended on it. It is not clear if this should be controlled by a property, since it does open a security hole in the general case, but we can implement the capability first before deciding how to control it.

Should this target 1.4.0?

      was (Author: rickhall):
    Yes, we just recently removed the "strict" property from the trunk, since we removed the last feature than depended on it. It is not clear if this should be controlled by a property, since it does open a security hole in the general case, but we can implement the capability first before deciding how to control it.
  
> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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


[jira] Commented: (FELIX-756) Allow URLStreamHandler services to override built-in handlers.

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645777#action_12645777 ] 

Pierre De Rop commented on FELIX-756:
-------------------------------------

Karl, 
The fix works fine (thank you !).

Now, it looks like I don't have the correct permission to close myself that issue. 
Could you please close it yourself ?
thanks

/pierre

> Allow URLStreamHandler services to override built-in handlers. 
> ---------------------------------------------------------------
>
>                 Key: FELIX-756
>                 URL: https://issues.apache.org/jira/browse/FELIX-756
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: felix-1.4.0
>
>
> In certain cases it might be desirable to override built-in URLStreamHandlers with services provided by bundles. As of now, the spec doesn't allow this (see 11.3.2 ff) but it might in the future. Furthermore, it looks like other implementations are less strict on this issue as we are. For now, the best one can do is to put handlers in the classpath of the framework and make them available via the java.protocol.handler.pkgs properties. This way, one can override the built-in handlers but needs control over the jvm (which is not the best solution). 
> It should be possible to add an option to felix that will register handlers that proxy the built-in ones but prefer registered URLStreamHandler services if there is one available for a given schema. 

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