Hi

I would suggest paxexam-karaf.

Regards
JB
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://wwx.talend.com

----- Reply message -----
From: "Gerald Preissler" <gpreiss...@talend.com>
To: "user@karaf.apache.org" <user@karaf.apache.org>
Subject: Best way to test blueprint-based applications with Karaf?
Date: Tue, Jun 26, 2012 9:25 am


Hi Achim,

thanks for the insight. Guess I'll go down the route you suggested, at 
least until I find some time at my hand to do some more experimentation.

Regards
     Jerry

p.s. The classloading issue you describe below could stem from the fact 
that one bundle gets passed an object that implements an interface from 
one bundle, but resolves the interface definition from another bundle, 
maybe even itself. Maybe you could try setting a breakpoint at the code 
location and compare the classloaders?

On 06/25/2012 05:52 PM, Achim Nierbeck wrote:
> Hi Gerald,
>
> I suggest sticking to testing with pax-exam or even better using 
> paxexam-karaf.
> I have the following reasons for this :)
>
> If you want to use blueprint jpa or something like this, I experienced
> trouble with pojoSR not being capable of providing some needed
> functionality for the jpa part of blueprint.
> It uses some internal OSGi method which resolves to a null-pointer
> exception. So this is not really capable for doing intense tests right
> now.
> (if I find some time I might add some patches :) )
> But it's good enough to test some basic blueprint wiring stuff.
>
> pax-exam is far better in usage since it really starts a container
> though this might increase the timing on the test.
> Though this can be some troublesome to get all required bundles
> working together this way. It needs some trial and error
> to have the right set of bundles available :)
> Though right now I also face an issue with this setup and
> blueprint:jpa. A rather strange Classcast excpetion.
> Somehow the javax.persistence Classes used by blueprint-jpa while
> instanciating the Entity objects is not the same when
> trying to find the corresponding meta-data. Somehow the Entity class
> used in both cases are not the same (classloader issue :( )
>
> Now finally if you use paxexam-karaf you have all the required bundles
> at hand and if you use jpa
> it magically seems to work right away (no idea what the difference is
> right now, still investigating :) )
> And of course if you are gonna use specialties in setup etc. this
> test-framework gives you just
> the right amount of power to get along :)
>
> Hope this helps some :)
>
> regards, Achim
>
> 2012/6/25 Gerald Preissler <gpreiss...@talend.com>:
>

Reply via email to