Search code examples
eclipseglassfishosgibundleequinox

Configuring Glassfish to use Equinox


Can anyone explain or point me to a good resource on configuring Glassfish 3.1.1 to use the Equinox 3.7 OSGI runtime, and creating/running some simple OSGI bundle for it? Trying to work my way up to deploying an RAP application on glassfish as OSGI bundle but haven't really been able to get off the ground.


Solution

  • Pretty simple:

    1. Just copy equinox jar (org.eclipse.osgi_$version.jar) to glassfish/osgi/equinox/.
    2. Set an environment variable: GlassFish_Platform=Equinox
    3. Start GlassFish.
    4. Now deploy your OSGi bundles by just copying them to glassfish/domains/domain1/autodeploy/bundles/

    For more information, see GlassFish/OSGi guide at http://glassfish.java.net/public/GF-OSGi-Features.pdf