synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <>
Subject Replacing sun.misc.Service
Date Tue, 02 Dec 2008 10:50:36 GMT
There are two problems with sun.misc.Service.

1) It isn't standard across JDKs
2) We are likely to run into problems in an OSGi environment.

I personally think that OSGi might provide the long term solution for
this - it can do the same thing, but I'm not clear if we are ready to
take a dependency on OSGi in the core at this point. That would mean
shipping with an OSGi library and therefore choosing which one etc.

So my proposal is that we do the following:

We simply create an interface that matches the current Sun interface
except in our stack:

package org.apache.synapse.configuration;

public interface ClassFinder {
    Iterator findImplementationsOf(Class clazz);

I renamed the interface and method names because I think the one's
that Sun uses are frankly confusing.

Then we can have a line in


Initially this implementation could be one of the different plugin
replacements for sun.misc.Service that works on any JDK. We could also
write an OSGi version, and we could write a version that say tries
OSGi first then the old style. Alternatively we could do some other

If there are no objections (or suggestions for improvement!) I will
make these changes over the next day.


Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair


"Oxygenating the Web Service Platform",

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message