geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick McGuire <>
Subject Re: Specs jars in OSGi
Date Tue, 16 Nov 2010 19:45:45 GMT
On 11/16/2010 7:31 AM, Guillaume Nodet wrote:
> Is there a description about how the spec jars work in OSGi ?
> I recall some discussion a long time ago, but i'd like to undestand
> what he main differences wrt the ServiceMix Specs jars are?
> Should we (ServiceMix) start to use the Geronimo ones instead ? That's
> the question I'd like to have an answer at.
> In which case, should we start pushing out from Geronimo non-j2ee
> specs like javax.scripting and others ...
The current Geronimo version is not too different from what the 
servicemix spec jars are doing.  There is an Activator added to each jar 
and a locator class that can check a registry to resolve classes that 
implement a particular interface.  All of the specs that need to load 
implementation classes use that locator to perform the lookups. There 
are some key differences:

1)  The META-INF services processing and the tests for inside 
OSGi/outside OSGi have been moved into the locator methods.
2)  Rather than each bundle doing its own provider tracking, there is a 
registry bundle that performs that function.  The locator methods will 
use the registry if the service is available and fall back to load from 
the classpath behavior when the service isn't.  This requires that the 
registry bundle also be started in the framework.

I certainly don't have any objections to additional specs getting added 
to the Geronimo collection.  Alan Cabrera did this recently for JSR319 
for example.


View raw message