I also recommend to use a service for this.

Simply put your test class into a separate bundle. In the activator instantiate the test class and publish it as a service using the test interface you provide.

The production bundle would then listen for services implementing the test interface e.g. using a service tracker and call them.

This has the advantage that you do not need any system property and class loading specialities. Another advantage is that you can start the test by deploying the test bundle and stop it again by removing it.
So no restart required.

Christian


On 12.12.2014 15:31, Achim Nierbeck wrote:
Dynamic Import?
Add a manifest header or dynamically importing your testclass in case it's
available,
but I would actually work with a service tracker that waits for the
"testservice" to be available and trigger the "test" then.

regards, Achim



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to