[jboss-as7-dev] OSGI Module Dependency Problems [Re: as7-master-testsuite-ip6 - Build # 5740 - Failure!]

Stuart Douglas stuart.w.douglas at gmail.com
Mon Nov 26 23:09:19 EST 2012


Hi Thomas,

So it turns out that the 2 second wait in the ServiceModuleLoader that 
we removed was actually covering up another bug in the way module 
dependencies are handled.

Basically the problem is that even though a module load service has a 
dependency on all its dependent modules, the module can actually be 
loaded prematurely if its contents are exported by another module.

e.g. we have A,B,C where A has a dependency on B, and B has a dependency 
on C with export=true.

If B's ModuleSpecService comes up first, then module A can be loaded, 
however there is no guarantee that C's ModuleSpecService will have 
started yet. Unfortunately we can't automatically handle this situation 
properly with some kind of transitive service dependency mechanism, 
because circular dependencies are allowed and quite common between 
modules, and and sort of pure service based approach runs into circular 
dependencies quite quickly.

I have worked around this for EE deployments, basically by simply adding 
a dependency on every ModuleSpecService in the deployment to each module 
load service, not ideal, but short of adding back the 2 second delay I 
can't really think of a better solution, and the 2 second delay caused 
other problems anyway.

OSGI still seems to have problems however, as can be seen in the recent 
spate of OSGI related intermittent failures, and I am not really sure 
how best to solve them. Do you have any ideas? If not, do you want to 
meet up on IRC and talk about it?

Stuart

ci-builds at redhat.com wrote:
> as7-master-testsuite-ip6 - Build # 5740 - Failure:
>
> Check console output at to view the results.
>
> Public: http://hudson.jboss.org/hudson/job/as7-master-testsuite-ip6/5740
> Internal: http://lightning.mw.lab.eng.bos.redhat.com/jenkins/job/as7-master-testsuite-ip6/5740/
>
> Test summary:
>
> 1 tests failed.
> FAILED:  org.jboss.as.test.integration.osgi.cdi.ManagedBeansTestCase.org.jboss.as.test.integration.osgi.cdi.ManagedBeansTestCase
>
> Error Message:
> Cannot deploy: complex.ear
>
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


More information about the jboss-as7-dev mailing list