[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-508) Declarative Services don't start if bundles are activated in different order

Martin Ždila (JIRA) jira-events at lists.jboss.org
Wed Jan 11 10:41:24 EST 2012


Martin Ždila created JBOSGI-508:
-----------------------------------

             Summary: Declarative Services don't start if bundles are activated in different order
                 Key: JBOSGI-508
                 URL: https://issues.jboss.org/browse/JBOSGI-508
             Project: JBoss OSGi
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Compendium Services
            Reporter: Martin Ždila
            Assignee: Thomas Diesler


I am using JBoss AS 7.1CR1b. I have two bundles each of them having one Declarative Service (Component). Bundle1 has Service1 and Bundle1 has Service2. Service2 Component is "immediate" and also has reference to Service1.

If I have both Bundle1 and Bundle2 in RESOLVED state and start them in order Bundle1, Bundle2, then both services are started (Service1=registered, Service2=unsatisfied) and my testcase prints:
{noformat}
16:34:27,124 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (qtp1633087118-107) Bundle started: gofer-sandbox1:1.0.0
16:34:28,646 INFO  [stdout] (qtp1633087118-110) activate 1
16:34:28,646 INFO  [stdout] (qtp1633087118-110) activate 2
16:34:28,656 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (qtp1633087118-110) Bundle started: gofer-sandbox2:1.0.0
{noformat}


But if the startup order is reverse (Bundle2, Bundle1) then none of the services starts and the components are in the state Service1=registered, Service2=unsatisfied and in the logs I see:
{noformat}
16:13:11,162 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (qtp1633087118-112) Bundle started: gofer-sandbox2:1.0.0
16:13:14,633 WARN  [org.jboss.osgi.framework.internal.ServiceState] (qtp1633087118-107) The service's classloader has no visibility of the requested class: com.mwaysolutions.gofer2.sandbox1.Service1
16:13:14,634 WARN  [org.jboss.osgi.framework.internal.ServiceState] (qtp1633087118-107) The service's classloader has no visibility of the requested class: com.mwaysolutions.gofer2.sandbox1.Service1
16:13:14,635 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (qtp1633087118-107) Bundle started: gofer-sandbox1:1.0.0
{noformat}

The testcase works correctly when using Apache Felix OSGi Framework with Apache Felix Declarative Services. I also think that the problem is deeper than in Declarative Services implementation.

I am attaching the testcase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-osgi-issues mailing list