users@jersey.java.net

Re: [Jersey] Classloader problem with Felix/Jetty

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Tue, 25 May 2010 18:22:47 +0200

Morten wrote:
> --- Den man 24/5/10 skrev Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>:
>
>> The aim is to provide the same jars to work in and outside OSGi. The
>> way how modularization is done is an orthogonal problem.
>>
>> If somebody just needs to build a client application, jsr311-api.jar,
>> jersey-core.jar and jersey-client.jar is everything needed
>>
>> regardless it is run within OSGi or not.
>> As i wrote, i need to fix the start order issue, but combining the
>> single modules is not the way i want to go.
>>
>
> I agree, but because of the detailed modularization you did it also means you will have to do the extra OSGI that follows as a result since OSGI modules can be installed and upgraded individually (i.e. add some Service or Bundle trackers).
>
>
>> In fact, we are actually using pax exam plugin.
>>
>
> Great, so does that mean that you are doing automated tests on multiple OSGI environments as Pax Exam supports (I am particularly interested in Felix AND Equinox) ?
>

We tried it, but the Equinox based tests seemed a bit unstable. I have
disabled them in the recent builds.
You can run them by yourself with:

mvn -Dtest=\*EquinoxTest clean install

I have fixed the bug you revealed in the jersey-samples archive in the
meantime, so after the fixed archive version
gets propagated to the maven repository, just download it and give it a
try using the command above.

It would be great, if you can have a look at the tests and maybe suggest
some improvements?
One possibly problematic area is described bellow.

To be able to test reliably, some events are generated when the war is
deployed/jersey servlet gets registered.
This technique is even required by the OSGi spec v4.2, but unfortunately
neither jetty nor grizzly (the containers used for testing)
follow that requirement. Then we have to generate the events of our own.
Are you aware of any container
sticking with the spec in this regard? (besides GlassFish, as that one
is already in my spotlight;-)

The event infrastructure API is defined as part of OSGi compendium spec.
For Equinox, the only available implementation
of this API i have found is:

        <dependency>
            <groupId>org.eclipse.equinox</groupId>
            <artifactId>event</artifactId>
            <scope>test</scope>
            <version>1.0.100-v20070516</version>
        </dependency>

The version above looks pretty obsolete. Are you aware of any more
recent stable version?
I know i can re-use the impl from Felix (which works fine for me with
Equinox),
but if Equinox does not provide something of it's own, i would rather
keep the tests disabled...

~Jakub


> /Morten
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>