[jboss-jira] [JBoss JIRA] Created: (JBMICROCONT-421) Unwanted recursion when Controller.install() is used recursively

Adrian Brock (JIRA) jira-events at lists.jboss.org
Mon Mar 23 11:10:22 EDT 2009


Unwanted recursion when Controller.install() is used recursively
----------------------------------------------------------------

                 Key: JBMICROCONT-421
                 URL: https://jira.jboss.org/jira/browse/JBMICROCONT-421
             Project: JBoss Microcontainer
          Issue Type: Bug
          Components: Dependency
            Reporter: Adrian Brock


There is some unwanted/unrelated recursion happening when Controller.install() is used recurisvely.

Imagine there are 3 contexts A,B,C all waiting on dependency D
When D is satisified all A,B,C do a further installation to the Controller.

What happens is that Controller says A, B and C are resolved
The controller then adds A to its "processing" set.

When A does its install its spots B and C are ready to move
and so it repeats the above for B which will in turn lead to the same thing for C.

D installed -> A.start() -> install() -> B.start() -> install() -> C.start()

When there are many A, B, C this will lead to a stack overflow.

The A, B, C are actually independent so there it should look more like:

D installed
-> A.start() -> install()
-> B.start() -> install()
-> C.start() -> install()
i.e. the invocations on A, B and C should happen on the same level of the call stack.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list