문제

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