users@glassfish.java.net

Re: GlassFish 3.1 embedded + OSGi = ???

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Wed, 09 Feb 2011 19:54:46 +0530

Hi Kane,

Yes, that blog is indeed dated. It is even simpler to embed GlassFish in
an OSGi runtime. No need to write any code. You just have to install and
start glassfish/modules/glassfish.jar bundle. Just set the following
properties in your OSGi environment:
com.sun.aas.installRoot=<full path to your glassfish3/glassfish/>
com.sun.ass.instanceRoot=<full path to your domain directory>

Let us know your experience.

Thanks,
Sahoo

On Wednesday 09 February 2011 05:55 PM, Michael Hollatz wrote:
> Hi *,
>
> I know you all are busy with the RC's and bug fixing but I have a
> "simple" question:
>
> How are we supposed to use the embedded GF within an OSGi environment?
>
> So we have some applications composed of OSGi Bundles and they also
> use the JavaEE/OSGi integration provided by GlassFish 3.1. In order to
> implement component/module tests I was thinking about using the
> glassfish-embedded-all to accomplish that but I want to make sure if
> it is confirmed (or proposed) to work or, if not, what other options
> you would recommend me to try.
>
> Thanx for any hint/information/links.
>
> Kane
>
> P.S.: I've already tried the approach that Sahoo described once here:
> http://weblogs.java.net/blog/ss141213/archive/2010/02/14/how-embed-glassfish-existing-osgi-runtime
>
>
> This one is a bit dated and trying that one with a recent promoted
> build lets the main glassfish-core bundle fail to start.