Discussion:
ejbPassivate() called after ejbCreate()
(too old to reply)
Tsozum Tsozum
2005-01-04 16:48:32 UTC
Permalink
I am looking at system where ejbPassivate() is being called right after ejbCreate(). What makes the EJB go from READY state to POOLED state right after its created? The ejbPostCreate() is called next and I am assuming that a different bean from the ready pool is used.

Any response is appreciated.
Thanks, ~vk
bill kemp
2005-01-04 17:55:29 UTC
Permalink
Just a guess, but is setRollbackOnly being called in the ejbCreate?

Bill
Post by Tsozum Tsozum
I am looking at system where ejbPassivate() is being called right after
ejbCreate(). What makes the EJB go from READY state to POOLED state right
after its created? The ejbPostCreate() is called next and I am assuming that
a different bean from the ready pool is used.
Post by Tsozum Tsozum
Any response is appreciated.
Thanks, ~vk
Tsozum Tsozum
2005-01-04 19:58:51 UTC
Permalink
Post by bill kemp
Just a guess, but is setRollbackOnly being called in
the ejbCreate?
setRollbackOnly is not being called. There are no exceptions being thrown in the method as well. I am really unable to tell why the bean is being passivated right after ejbCreate()?

Even though this is not hurting any functionality but I am thinking that this passivation process will result in affecting performance over the long run.

Also I was the distinct impression that when passivation of EJB happens (BMP case), ejbStore will be called before ejbPassivate?

Thanks, ~vk
bill kemp
2005-01-04 21:23:45 UTC
Permalink
ejbStore doesn't have to be called if the bean is already synched with the
db as a result of the create.

Do you have <max-beans-in-cache> set to a low number, like 1?

Bill
Post by Tsozum Tsozum
Post by bill kemp
Just a guess, but is setRollbackOnly being called in
the ejbCreate?
setRollbackOnly is not being called. There are no exceptions being thrown
in the method as well. I am really unable to tell why the bean is being
passivated right after ejbCreate()?
Post by Tsozum Tsozum
Even though this is not hurting any functionality but I am thinking that
this passivation process will result in affecting performance over the long
run.
Post by Tsozum Tsozum
Also I was the distinct impression that when passivation of EJB happens
(BMP case), ejbStore will be called before ejbPassivate?
Post by Tsozum Tsozum
Thanks, ~vk
Tsozum Tsozum
2005-01-04 22:02:17 UTC
Permalink
Thanks bill for your response.
Post by bill kemp
Do you have <max-beans-in-cache> set to a low number,
like 1?
No. We dont have max-beans-in-cache entry specified. So I believe its left at default value which is 1000 I believe.

This particular EJB is used heavily. This leads to me to think that we might have shot beyond the default cache value which is resulting in passivation.

Thanks, ~vk

Loading...