Hi Harald,
Yes, it is possible to use Pax-Exam with GlassFish. In fact, I use maven
+ pax-exam + junit as our internal test framework for OSGi Application
Support related features (aka fighterfish modules) in GlassFish. If you
want to take a look at some of the existing test cases to see how we use
these combinations, then you can find them at [1]. The pom.xml has
profiles to test against different JVMs and different OSGi platforms.
There is a small utility bundle called test.util which the tests rely
on. It can be found in [2]. It provides methods like call back when a
WAB deployment is over, methods to configure data sources and jms
resources in glassfish, utility to track GlassFish itself, etc. To keep
each test class small, some of the common functionality like exam
configuration is provided in a base class called
CommonConfiguration.java in [1]. Ideally it should be moved to test.util
as well. As I wrote to someone else yesterday in this forum, I am
supposed to clean up this test packages a bit and document it so that
our users could benefit from it if they want. If things go as planned, I
should be done by this weekend. But, with your knowledge of pax-exam, I
don't think you need any such document. Look forward to your help and
feedback,
Sahoo
[1]
https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/test/test.it/src/test/java/
[2]
https://svn.java.net/svn/glassfish~svn/trunk/fighterfish/test/test.util
On Wednesday 10 August 2011 11:11 PM, Harald Wellmann wrote:
> Is it possible to use Pax Exam to test hybrid OSGi bundles provisioned
> on GlassFish?
>
> This can be reduced to another question: Is it possible to let a
> running OSGi framework start Glassfish instead of having Glassfish
> start an OSGi framework?
>
> If Sahoo's article
>
> http://weblogs.java.net/blog/ss141213/archive/2010/02/14/how-embed-glassfish-existing-osgi-runtime
>
>
> is still up-to-date then this would require some plumbing. I wonder if
> there's an easier way of doing this in GlassFish 3.1.1.
>
> Best regards,
> Harald