users@glassfish.java.net

Re: Hosting Glassfish in Equinox

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Tue, 03 May 2011 22:13:44 +0530

On Tuesday 03 May 2011 08:22 PM, Azubuko Obele wrote:
> Some progress on this front:
>
> Still working towards getting Glassfish hosted in Equinox. Added the
> glassfish/modules/ directory to my target platform in Eclipse. Created
> a new 'Run Configuration' with only the org.glassfish.core.glassfish
> checked to autostart.
I am not really an Eclipse expert, so I don't know what it means to
create a target platform or create a new configuration. Have you tried
simply by starting vanilla equinox and starting glassfish.jar bundle.
Once it works, try all the other eclipse ways of doing things. When you
embed inside Equinox, you have to configure the framework with the
following settings:

org.osgi.framework.bundle.parent=framework

# See equinox bug #329314
osgi.resolver.preferSystemPackages=false

You can see them in glassfish/osgi/equinox/configuration/config.ini that
we ship in GlassFish.

I once tried to embed GlassFish inside Eclipse IDE and I seem to
remember all I had to do was to start Eclipse with
-Dcom.sun.aas.installRoot property set, copy glassfish.jar to eclipse's
plugin's folder and start that bundle once. You can even turn
glassfish.jar into an eclipse plugin bundle to avoid having to start it
by hand.

Thanks,
Sahoo