dev@glassfish.java.net

Re: GlassFish 3.1 embedded + OSGi = ???

From: Michael Hollatz <michael.hollatz_at_profitbricks.com>
Date: Wed, 09 Feb 2011 15:39:35 +0100

Hi Sahoo,

thanx for that info. I'll give it a try.

However, I think for most developers it would be even easier to use the
embedded version but as it doesn't come as an OSGi bundle itslef I
wondered if that is even supported?

Thanx,

Kane

On 02/09/2011 03:24 PM, Sahoo wrote:
> 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.
>