felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet" <gno...@gmail.com>
Subject Classloaders and FrameworkUtil
Date Mon, 03 Mar 2008 10:17:53 GMT
Currently, there is a problem if you have both org.osgi.core jar and
the framework jar in your classpath because both can not be easily
used together.
For example I'm writing junit tests that use LDAP filters.  The OSGi
standard way to create those is to call:

Unfortunately, the org.osgi.core jar defines an implementation which
is not compatible with the felix framework, because it looks for a
class named FrameworkUtil in a package defined by a system property
(org.osgi.vendor.framework).   This class is not defined by the felix
framework. This is usually not a problem in the OSGi container,
because the classpath is correctly set, but when writing junit tests
in maven, it sometimes quite tricky to order the classpath correctly
(I haven't found a way in my case).

So I', wondering if I could write a patch that would add this class
and that would allow the standard call to work even if the classpath
is not correctly ordered.
Actually, it's just a copy of the org.osgi.framework.FrameworkUtil
class in the org.apache.felix.framework class I suppose.

Thoughts ?  Would such a patch be accepted ?

Guillaume Nodet
Blog: http://gnodet.blogspot.com/

View raw message