Вопрос

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