[jboss-user] [JBoss Microcontainer Development] New message: "Re: Pluggable dependency resolver"

Kabir Khan do-not-reply at jboss.com
Mon Feb 8 07:27:34 EST 2010


User development,

A new message was posted in the thread "Pluggable dependency resolver":

http://community.jboss.org/message/524747#524747

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
I did a little benchmark to test out my assumption that the indexing resolver performs better for large amounts of contexts waiting for dependencies. In each case I deploy 1000 beans.
 
* Scenario 1 - all contexts in the right order
Bean 1 has no depdencies
Bean 2 depends on Bean 1
Bean 3 depends on Bean 2
etc.
 
Standard resolver: 702 ms
Indexing resolver: 554 ms
 
* Scenario 2 - all contexts in wrong order
Bean 1 depends on Bean 2
Bean 2 depdends on Bean 1
etc.
 
Standard resolver: 3476
Indexing resolver: 601
 
I tried this with higher numbers, but this causes a StackOverflowError with the indexing resolver, the reason being that it works recursively when a waiting context gets its dependencies resolved. AbstractController.install()->IndexingDependencyResolver.resolveContext(ControllerContext) (takes the installed context as param) ->AbstractContoller.incrementState()->IndexingDependencyResolver.stateIncremented()->IndexingDependencyResolver.resolveContext(ControllerContext) (takes any waiting context as param). I'll try to untangle this recursion.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/524747#524747




More information about the jboss-user mailing list