felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yang Paulex" <paulex.y...@gmail.com>
Subject Re: Felix on Harmony (was Re: Anyone used Felix succesfully under Harmony?)
Date Fri, 07 Sep 2007 08:57:46 GMT
2007/9/7, Karl Pauls <karlpauls@gmail.com>:
>
> On 9/7/07, Yang Paulex <paulex.yang@gmail.com> wrote:
> > 2007/9/7, Karl Pauls <karlpauls@gmail.com>:
> > >
> > > I just commented on the JIRA issue you raised (basically saying what
> > > Felix said). Sorry, I missed this thread.
> > >
> > > The important point is that you can change the default handler
> > > packages via properties as described in:
> > >
> > > http://felix.apache.org/site/faq.html
> > >
> > > and as Felix pointed out.
> >
> >
> > Just tried it out, I uncommented the line of "
> > framework.service.urlhandlers=false" in conf/config.properties, but it
> > doesn't work for me with almost same stack trace. :(
>
> This property is out of date. The FAQ mentions the correct one:
>
> felix.service.urlhandlers=false
>
> should work.


Yes, it works!  :)

> And the "-Djava.protocol.handler.pkgs" setting in command line does work,
> > but I hold my thoughts that it has potential issue.
>
> What issue?


The property is provided by JSE  to any java applications, so if Harmony or
other JRE used this to make Felix work, there's risk that application
override the settings, then they'll saw a strange stacktrace like I got
before, i.e., the setting is intrusive and may break applications in some
situation.

> But anyway, thank you both for your help. I'll close the FELIX-358 soon.
> :-)
> >
> > Regarding the test suite, this is one of the major outstanding issues.
> > > We currently don't have one. Richard has access to the TCK and uses
> > > that as a somewhat debatable test-suite and I run a couple of projects
> > > before releases to make sure everything is still working but we really
> > > need to address this asap.
> >
> >
> > Ah...I see, is it OK to share me the projects you are used to run?
>
> Unfortunately no. But we are working on a test-suite which we plan to
> make available to the community soon.


Cool!

regards,
>
> Karl
>
> > regards,
> > >
> > > Karl
> > >
> > > On 9/7/07, Yang Paulex <paulex.yang@gmail.com> wrote:
> > > > 2007/9/7, Felix Meschberger <fmeschbe@gmail.com>:
> > > > >
> > > > > Hi Paulex,
> > > > >
> > > > > If you have issues with the URL Handlers Service of Felix you can
> > > switch
> > > > > it off by setting the framework.service.urlhandlers property to
> false
> > > > > (see also [1]). This is currently also the only solution to run
> the
> > > > > Felix framework in an environment, which already sets the Java
> runtime
> > > > > URLStreamHandlersFactory such as application servers.
> > > >
> > > >
> > > > thanks a lot, Felix, I'll have a try.
> > > >
> > > > Am Freitag, den 07.09.2007, 14:32 +0800 schrieb Yang Paulex:
> > > > > > After some tracing, I finally found these two constants in
> > > > > >
> framework/src/main/java/org/apache/felix/framework/URLHandlers.java:
> > > > > >     private static final String DEFAULT_STREAM_HANDLER_PACKAGE
=
> "
> > > > > > sun.net.www.protocol";
> > > > > >     private static final String DEFAULT_CONTENT_HANDLER_PACKAGE
> = "
> > > > > > sun.net.www.content";
> > > > >
> > > > > You might also try to set the standard properties
> > > > > "java.protocol.handler.pkgs" and "java.content.handler.pkgs" to
> the
> > > > > harmony packages. This would not require touching the framework
> code.
> > > >
> > > >
> > > > Yes, I understood this should work, but I'm not sure it's a
> solution,
> > > > because this properties is provided to applications, so I'd rather
> leave
> > > > this alone for Harmony as a JRE, otherwise, it may be overridden by
> > > > application settings.
> > > >
> > > > > My current thoughts is, is it possible for Felix's
> URLHandlers.java to
> > > > > only
> > > > > > handle the Felix interested protocals("Felix://"?), and just
> ignore
> > > > > others
> > > > > > (return null in createURLStreamHandler()), and actually
> > > java.net.URLwill
> > > > > > try to handle them with builtin URLStreamHandlers. If I find
> some
> > > time
> > > > > > recently, I'll try if this works. But I'd like to hear from
> Felix
> > > guru
> > > > > at
> > > > > > first if this has any potential problems, i.e., it may be
> > > intentional
> > > > > > behavior to load JSE built in handlers at first.
> > > > >
> > > > > This will probably not work because the Felix handlers exist to
> > > > > implement the OSGi URL Handlers Service Specification which allow
> for
> > > > > the registration and unregistration of custom URL Stream and
> Content
> > > > > handlers.
> > > > >
> > > > > The check for the configured handlers exists to not overwrite any
> > > > > pre-configured handler from the environment with a handler
> provided
> > > from
> > > > > within the framework. This is also specified in section 11.3.2
> (Built-in
> > > > > Handlers) of the core specification: "[...] built-in handlers
> should
> > > > > take priority over handlers from the service registry to guarantee
> > > > > consistency. The built-in handlers, as defined in the OSGi
> execution
> > > > > environments must never be overridden." (page 266 of the R 4.1Core
> > > > > Spec)
> > > >
> > > >
> > > > I see,  thanks you for the explanation.
> > > >
> > > > Actually, URL Handlers is the issue of another Felix issue (FELIX-38
> > > > > [2]). The attached fix is probably not usable due to licensing
> issues
> > > > > and a new implementation has to be devised.
> > > >
> > > >
> > > >
> > > > Regards
> > > > > Felix
> > > > >
> > > > > [1] https://issues.apache.org/jira/browse/FELIX-38#action_12504409
> > > > > [2] https://issues.apache.org/jira/browse/FELIX-38
> > > > >
> > > > >
> > > > I have another question actually, I'd like to explore if Harmony can
> > > support
> > > > Felix completely, the best way I can imagine is to run the Felix's
> test
> > > > suites, but I canont find how to run it if there are any available,
> > > neither
> > > > on felix websites nor in the build.xml, would anybody help?
> > > >
> > > > Or an alternatives is to try some applications as scenario tests, so
> > > does
> > > > anyone have suggestions which application/scenario will be the best
> > > > candidate as start? I've executed several simple commands on Felix's
> > > shell
> > > > like "version", "services", "obr", etc, but IMO it's far from enough
> but
> > > a
> > > > smoke test.
> > > >
> > > > --
> > > > Paulex Yang
> > > > China Software Development Lab
> > > > IBM
> > > >
> > >
> > >
> > > --
> > > Karl Pauls
> > > karlpauls@gmail.com
> > >
> >
> >
> >
> > --
> > Paulex Yang
> > China Software Development Lab
> > IBM
> >
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>



-- 
Paulex Yang
China Software Development Lab
IBM

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message