users@glassfish.java.net

Re: OSGi module deployment support in Embedded Glassfish 3.1.1 / 3.2 ?

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Wed, 10 Aug 2011 01:23:37 +0530

Hi Ingo,

You can use embedded glassfish for testing hybrid apps. I already do it
in my dev tests [1] where I use maven, pax-exam, junit as the tools, but
I explicitly install GlassFish before running the tests. I was supposed
to clean up my dev test framework and document by end of last week, but
I am (as usual) running behind schedule. Let me see if I can finish this
week. If I do, I will post a note to you as well. Until then, feel free
to ask more questions if you have any about this test framework.

As you figured out, the installation step can be automated using maven
as well, but I am not sure why you are so much opposed to using
something like a unzip Ant task inside your maven pom. Anyway, I just
wrote a simple installer bundle [2] which can be used to download
glassfish distribution from a configured url, extract it in a configured
directory and then install & start GlassFish. It is really simple.

Thanks,
Sahoo

nb: Pl. start using GF 3.1.1 as there are some important bug fixes made
in 3.1.1 since 3.1.

[1] https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/test/test.it
[2]
https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/sample/sample.embeddedgf/sample.embeddedgf.provisioner

On Monday 08 August 2011 10:21 PM, Ingo Fischer wrote:
> Hi *,
>
> We are building a hybrid JEE/OSGi application running on Glassfish 3.1.
> Currently we are using the full Glassfish for component/integration
> tests, because Embedded Glassfish, at least version 3.1, does not come
> with Felix and therefore does not support deploying OSGi modules.
> (my colleague asked this related question some time ago:
> http://www.java.net/forum/topic/glassfish/glassfish/glassfish-31-embedded-osgi
> <http://www.java.net/forum/topic/glassfish/glassfish/glassfish-31-embedded-osgi> )
> Since a full Glassfish must be available on the test system (which has
> to be installed manually), I wonder if it will be possible soon to use
> an Embedded Glassfish for testing hybrid JEE/OSGi applications, making
> the tests more portable.
>
> Are there plans to add Felix / OSGi module deployment support for
> Embedded Glassfish soon, and which version would it be?
> If not, is there a way to download the full Glassfish within the Maven
> lifecycle in a clean Maven-ish way (without using embedded Ant tasks,
> scripts or similar hacks)?
>
> Thanks,
> Ingo