This content has been marked as final.
Show 4 replies
-
1. Re: populating method-ready pool on deployment
darranl Dec 21, 2004 12:18 PM (in response to eztrip)You shouldn't be putting code into the constructors of your EJB components.
-
2. Re: populating method-ready pool on deployment
eztrip Dec 21, 2004 1:12 PM (in response to eztrip)Looking back at my post I didn't say that I put code in my constructors. I'm not sure what you're saying??
I'm putting code in my ejbCreate() which where initialization code rightly belongs. When the container creates an instance of an MDB, ejbCreate() is called and what I want to happen is have the container instantiate a set number of MDB instances before messages start flowing through the system.
That's my question.
Mike -
3. Re: populating method-ready pool on deployment
darranl Dec 22, 2004 8:52 AM (in response to eztrip)Looking back at my post I didn't say that I put code in my constructors. I'm not sure what you're saying??
Is there any way to tell JBoss to call newInstance() on my MDB's as soon as they are deployed?
That is where I am getting that you have code in the constructor, newInstance is just calling the constructor nothing else - calling setMessageDrivenContext and calling ejbCreate are additional steps that occur any time later before the bean is first used.
The EJB pools do not have a mechanism to fill to the minimum, the value specified is used by JBoss to prevent the instances from being removed and taking the number in the pool below the minimum. -
4. Re: populating method-ready pool on deployment
eztrip Dec 22, 2004 9:31 AM (in response to eztrip)sorry - my bad. I was assuming that it was understood in my poorly phrased post that the "container" calls newInstance() which is what happens first. Anyway, thank you for the info on how the Pools work.
Mike