dana-i2cat/opennaas — pull request #122 by isartcanyameres (2012-04-24 11:47:36+00:00)
Title: Fix/gave up waiting for service error

This error was appearing together with the following one, being this one the cause:
org.apache.aries.jpa.container | No JTA datasource could be located using the JNDI name osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/opennaas-resources)
javax.naming.NameNotFoundException: osgi:service/javax.sql.DataSource/"(osgi.jndi.service.name=jdbc/opennaas-resources)"

The problem was that resource repositories required a service published in org.opennaas.core.resources bundle, but that dependency was not specified in blueprint configuration files. As a result, repositories for resources were considered active although a service they depended on was not. During execution, if the required service was not active, the mentioned "Gave up waiting for service" error appeared.

This patch adds a depencendy for required service in resource repositories bundles (network, router, bod, roadm), using the blueprint configuration files.

It also adds some @Injects for blueprint containers in integration tests that require resource repositories. This @Inject causes the test to wait for resource repository (and its required services) to be loaded.

All tests have been launched, without noticing the mentioned error.