Hi,
On Tue, Jul 15, 2008 at 8:33 PM, janandith jayawardena
<[EMAIL PROTECTED]> wrote:
> ...how are the current 3rd party libraries accessed in sling. are they all in
> one bundle. ex: javax.jcr , jackrabbit etc....
Almost every Maven module in the Sling codebase generates a bundle,
and some of them export the general libraries that you mention.
jcr/api/pom.xml, for example, contains
<Export-Package>
...
<!-- Re-export JCR API -->
javax.jcr.*;version=1.0
</Export-Package>
So it's this bundle which makes the JCR API interfaces available to
the other bundles.
The Export-Package instructions are used by the maven-bundle-plugin
[1] to generate the bundle metadata.
Another way to make classes from the startup classloader available to
bundles is to use the bootdelegation mechanism
(org.osgi.framework.bootdelegation property, defined by the OSGi
spec). This is used for example in
launchpad/base/src/main/resources/WEB-INF/jcr-client.properties, to
make sure the JCR API classes are loaded from the startup classloader,
to allow using a Repository running in another webapp and acquired via
JNDI. That somewhat falls into the "advanced classloading" category
though, and is used only when really needed.
-Bertrand
[1] http://felix.apache.org/site/maven-bundle-plugin-bnd.html