-
1. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
starksm64 May 9, 2005 2:50 PM (in response to theaps)So I have to ask why this logic should work at all since you are describing a circular processing chain. The real question would be why it did not fail previously.
-
2. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
theaps May 9, 2005 4:48 PM (in response to theaps)Yes. Having one object init another which inits a new instance of the first would obviously never work. This application, however, has been working for over a year now.
My assumption is that the circular referencing problem can be avoided with EJBs (and must have been with previous versions of JBoss) because, using the previous example, the local (proxy) ref being requested by BeanC would NOT require a NEW instance of BeanA, so BeanA's ejbCreate would not be called again (these are stateless session beans).
I was just wondering if the way the container pools stateless session beans changed, and/or whether there is a configuration change that I can make to avoid this.
Thanks again. -
3. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
starksm64 May 10, 2005 8:32 PM (in response to theaps)Nothing comes to mind as to what change would introduce differing pooling behavior. Similarly, I don't know why this ever should have worked.
-
4. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
adrian.brock May 10, 2005 8:49 PM (in response to theaps)http://jira.jboss.com/jira/browse/JBAS-1600
Previously, home.create() only created the proxy to the ejb. It didn't try
to create the ejb instance.
This change is incomplete anyway, since the home.create() might suceed,
but some other thread takes that instance and the remote/local method
still has to create another instance and that might fail.
The UndeclaredThrowableException should not be happening.
It should be throwing an EJBException if it cannot create an instance to satisfy
a particular request. -
5. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
adrian.brock May 10, 2005 8:56 PM (in response to theaps)What the user is doing is clearly not portable, since the EJB spec
does not mandate lazy construction of instances like the 4.0.1sp1 pooling code,
though I imagine most appservers have some config parameter to enable
this behaviour. -
6. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
starksm64 May 11, 2005 12:54 AM (in response to theaps)I should remember changes I make ;)
-
7. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
theaps May 17, 2005 11:05 AM (in response to theaps)I wanted to thank you Scott and Adrian for taking the time to respond. To upgrade to 4.0.2, we have removed the circular references causing the above problems and everything seems fine.
The ability to lazy init session bean instances does sound appealing in some circumstances, though... -
8. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
joshid Jul 7, 2005 2:37 PM (in response to theaps)Hi,
Has anyone put forth a lazy init param for the SLSB? We have a large app we are migrating to 4.0.2 affected by this.
Thanks,
Dan -
9. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
achetan Sep 26, 2005 1:27 AM (in response to theaps)Hi ,
I am also getting same problem which is in discussion.
Please suggest me if you are able to figure out lazy init for SLSB in JBOSS 4.0.2 or any other work around.
Thanks and regards
Chetan -
10. Re: 4.0.1sp1 to 4.0.2 causes recursive ejbCreate calls then
joshid Sep 26, 2005 7:44 AM (in response to theaps)I've receieved a few e-mails about this and I just wanted to follow up. It is ok if one ejb init inits another ejb...only when there is an initing loop back to a bean in the init chain do you run into trouble. So we went through the code and found only those places where there is a loop and moved the initing into the actual ejb method calls, a.k.a., makshift lazy initing.
Hope this helps,
Dan