Re: PAX Exam OSGI Components
On Friday 23 February 2018 14:09:30 'Christoph Läubrich' via OPS4J wrote: > What should PaxExam Inject if the component does not publish a service? > What should it check for? All this can better be handled bei a JUnit > rule as described before. Please read my previous answers. O. > Am 23.02.2018 um 13:55 schrieb Oliver Lietz: > > On Wednesday 21 February 2018 13:47:46 'Christoph Läubrich' via OPS4J wrote: > >> Well it might depend on the concrete case, but there is nothing PaxExam > >> can really do, of course if you have such a very special case you can > >> always fetch the ScrService and "wait"/check state for the component, > >> but in general such things are bad in OSGi and you should better use > >> some kind of Whitebord-pattern or notifications. > > > > Which things are bad in OSGi? Better use whiteboard or notifications for > > what? > > > > We have components which are not published as services and in some tests > > it is useful to "wait" for them. The boilerplate code for that could be > > provided by Pax Exam (similar to @Inject for services). > > > > Neil gave a good explanation for components on SO: > > https://stackoverflow.com/a/8887216 -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: PAX Exam OSGI Components
What should PaxExam Inject if the component does not publish a service? What should it check for? All this can better be handled bei a JUnit rule as described before. Am 23.02.2018 um 13:55 schrieb Oliver Lietz: On Wednesday 21 February 2018 13:47:46 'Christoph Läubrich' via OPS4J wrote: Well it might depend on the concrete case, but there is nothing PaxExam can really do, of course if you have such a very special case you can always fetch the ScrService and "wait"/check state for the component, but in general such things are bad in OSGi and you should better use some kind of Whitebord-pattern or notifications. Which things are bad in OSGi? Better use whiteboard or notifications for what? We have components which are not published as services and in some tests it is useful to "wait" for them. The boilerplate code for that could be provided by Pax Exam (similar to @Inject for services). Neil gave a good explanation for components on SO: https://stackoverflow.com/a/8887216 -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: PAX Exam OSGI Components
On Wednesday 21 February 2018 13:47:46 'Christoph Läubrich' via OPS4J wrote: > Well it might depend on the concrete case, but there is nothing PaxExam > can really do, of course if you have such a very special case you can > always fetch the ScrService and "wait"/check state for the component, > but in general such things are bad in OSGi and you should better use > some kind of Whitebord-pattern or notifications. Which things are bad in OSGi? Better use whiteboard or notifications for what? We have components which are not published as services and in some tests it is useful to "wait" for them. The boilerplate code for that could be provided by Pax Exam (similar to @Inject for services). Neil gave a good explanation for components on SO: https://stackoverflow.com/a/8887216 O. > If you describe your usecase a little bit more one might suggest a way > how it can be archived... > > Am 21.02.2018 um 13:41 schrieb Oliver Lietz: > > On Wednesday 21 February 2018 13:07:07 'Christoph Läubrich' via OPS4J wrote: > >> What exaclty do you want to archive? > >> > >> "Waiting" for a component to become active that does not export a > >> service is mostly useless in a test (since you can't query the > >> component) and in the other case you can simply wait for the service the > >> component exports. > >> > >> "component" is just an internal concept of SCR from the outside a > >> component does not look any different than other services and should be > >> handeled as those. > > > > Components (and private services of course) can change the behavior of a > > system and in some cases it makes sense to wait for them before starting > > tests. As it's not possible to "reference" them, creating proxy services > > by > > using DS would be one way. > > > > Regards, > > O. -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.