[jboss-jira] [JBoss JIRA] (AS7-4244) Framework activate operation returns prematurely

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Wed Mar 21 06:13:48 EDT 2012


Thomas Diesler created AS7-4244:
-----------------------------------

             Summary: Framework activate operation returns prematurely
                 Key: AS7-4244
                 URL: https://issues.jboss.org/browse/AS7-4244
             Project: Application Server 7
          Issue Type: Bug
          Components: OSGi
            Reporter: Thomas Diesler
            Assignee: David Bosschaert
             Fix For: 7.1.2.Final


The current implementation 

{code}
    protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException {
        ServiceController<?> svc = context.getServiceRegistry(false).getRequiredService(Services.FRAMEWORK_ACTIVE);
        svc.setMode(Mode.ACTIVE);
        context.completeStep();
    }
{code}

activates the service without waiting for it to come up. As a result you may get

{code}
org.junit.ComparisonFailure: expected:<[1]> but was:<[0]>
	at org.junit.Assert.assertEquals(Assert.java:125)
	at org.junit.Assert.assertEquals(Assert.java:147)
	at org.jboss.as.test.integration.osgi.management.OSGiManagementTestCase.testFrameworkActivation(OSGiManagementTestCase.java:71)


[CLI-out] [standalone at 10.16.95.126:9999 /] /subsystem=osgi:read-attribute(name=startlevel)
[CLI-out] {
[CLI-out]     "outcome" => "success",
[CLI-out]     "result" => undefined,
[CLI-out]     "response-headers" => {"process-state" => "reload-required"}
[CLI-out] }
[CLI-inp] /subsystem=osgi:activate
[CLI-out] [standalone at 10.16.95.126:9999 /] /subsystem=osgi:activate
04:08:53,619 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-8) JBossOSGi Framework Core - 1.2.0.Beta2
[CLI-out] {
[CLI-out]     "outcome" => "success",
[CLI-out]     "response-headers" => {"process-state" => "reload-required"}
[CLI-out] }
[CLI-inp] /subsystem=osgi:read-attribute(name=startlevel)
[CLI-out] [standalone at 10.16.95.126:9999 /] /subsystem=osgi:read-attribute(name=startlevel)
[CLI-out] {
[CLI-out]     "outcome" => "success",
[CLI-out]     "result" => 0,
[CLI-out]     "response-headers" => {"process-state" => "reload-required"}
[CLI-out] }
04:08:55,746 INFO  [org.jboss.osgi.framework.internal.StartLevelPlugin] (MSC service thread 1-4) Starting bundles for start level: 1
04:08:55,752 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: javax.servlet.api:2.5.0.Final
04:08:55,755 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: osgi.enterprise:4.2.0.201003190513
04:08:55,782 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: org.apache.felix.log:1.0.0
04:08:55,840 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: org.apache.felix.configadmin:1.2.8
04:08:55,860 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: jboss-osgi-logging:1.0.0
04:08:55,868 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: jboss-as-osgi-configadmin:7.1.2.Final-SNAPSHOT
04:08:55,873 INFO  [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-4) OSGi Framework started
{code} 

--
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-jira mailing list