سؤال

Currently I'm using Pax Exam 3.X (Native container: apache.felix.framework) to test an OSGi application.

I'm trying to start the declarative services automatically, but I can only start them calling the activate() method explicitly inside every test.

Is there another way to activate the declarative services?

Many thanks.

هل كانت مفيدة؟

المحلول

Have a look at DeclarativeServicesTest in the Pax Exam integration test suite for a working example.

نصائح أخرى

Looks like you need some sort of Extender to start your DS bundles. Maybe you just need to add something like Felix-SCR in your Pax Exam configuration? At least that how it works if you have blueprint bundles in your test, you'll need some sort of blueprint framework to start your blueprint bundles.

I have to adapt my code. I've introduced Felix-SCR, but I'm continuing working on. Many thanks to hwellmann and Achim Nierbeck for your time.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top