[jboss-user] [Microcontainer] - Re: How to install a bean without affecting unrelated bean's
jaikiran
do-not-reply at jboss.com
Fri Mar 20 09:55:56 EDT 2009
"alesj" wrote :
| If you wanted this, it would mean you would have to express all your
| "unrelated" dependencies, hence making it *related*. :-)
|
Not sure i understand this - the BMD being installed (Bean2) has all the related dependencies defined within itself. And those dependencies are *not* on Bean3 or any other contexts.
"alesj" wrote :
| Why would this bother you?
|
Okay, so here's the real issue https://jira.jboss.org/jira/browse/EJBTHREE-1724 and here's what's happening (the real scenario which i mocked in my post earlier):
1) Consider an application having around 300 EJBs
2) EJBContainer (this is the Bean1 we talked in my first post) corresponding to one of these 300 beans has a start which installs a proxyfactory (bean2 in the earlier post).
2) The kernel internally has other contexts for remaining 299 beans ready to be pushed to START.
3) The proxyfactory (bean2) is *not* dependent on any of these 299 beans (kernel contexts Bean3, Bean4, Bean5 that we discussed in my first post) and ideally can be "installed" without having to do anything with the remaining 299 contexts. (This isn't the case currently in MC - read #4 below)
4) Right now in MC, the proxyfactory install (which was triggered by the EJBContainer (Bean1)) triggers a START of Bean3 which installs proxyfactory2 which then triggers START of someother context (Bean4) and this goes on and on for all those 300 beans and effectively leads to a recursive call on the same instance of AbstractController install method, leading to a StackOverflowError.
Since proxyfactory and the other contexts are unrelated and independent, i would have expected no state change on other beans when proxyfactory is installed thus avoiding this recursion on the same method.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219868#4219868
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219868
More information about the jboss-user
mailing list