Yes, we do fallback to the java.protocol.handler.pkgs system property.
Let us know if you run into any difficulties with that as it would be
a bug if that doesn't work :-)

regards,

Karl

On Tue, Nov 10, 2009 at 8:16 AM, Royce Ausburn <ro...@inomial.com> wrote:
> Hi again,
>
> I've been doing a little more reading of the code and I think I was mistaken. 
>  Looks like the lookup is done properly in 
> URLHandlers.getBuiltInStreamHandler().
>
> Sorry - must have got a wire crossed.
>
> --Royce
>
> On 10/11/2009, at 2:13 PM, Royce Ausburn wrote:
>
>> G'day all,
>>
>> I'm porting a legacy application to Java EE and having trouble running my 
>> app under glassfish v3 prelude.
>>
>> The problem is URL stream handlers.  My application used to register a 
>> URLStreamHandlerFactory against java.net.URL, but that doesn't work anymore 
>> as felix registers a factory before my app starts.  So I decided to use the 
>> java.protocol.handler.pkgs system property only to find that it's not 
>> effective.  After checking out Felix from svn I found the URLHandlers class 
>> honours handlers for some default protocols (file, ftp, http, https, jar), 
>> but it seems that any other protocols are discarded.
>>
>> I'm not familiar with osgi... Is it intended behaviour to ignore the rest?  
>> If so, I'm interested to know why.
>>
>> I suppose I have the option to write a bundle and register that, but I'm not 
>> keen on it... The application's handlers use classes from the application 
>> and working out how this would work in a bundle isn't something I'd like to 
>> spend my time on as I have deadlines to meet =(
>>
>> Is there any way I can get around this?  Would it be possible to have the 
>> URLHandler class fall back to the system properties if no bundle has been 
>> registered?
>>
>> Cheers!
>>
>> --Royce
>>
>
>



-- 
Karl Pauls
karlpa...@gmail.com

Reply via email to