dcsimg
When will the ejbPassivate and ejbActivate be invoked
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   karthikeyan_Shanmugam
Posted On:   Tuesday, April 2, 2002 07:56 AM

Suppose if iam using a stateful session bean,if i specify System.out.println("some text"); inside ejbPassivate() method and ejbActivate() method it is noe printing it in the console. Iam using J2EE1.2.1 application server.Even if i specify j2ee -verbose also it is printing. So how will i know whether passivation is occuring or acitivation is occuring.SO before passivation it should invoke ejbpassivate and it should execute all the coding inside that method, but it is not comming. I asked many people , but those people answers are all not convincing to me... This is my fifth java user group.none of the other user group had answered thisquestion. Thoughit may look    More>>

Suppose if iam using a stateful session bean,if i specify
System.out.println("some text"); inside ejbPassivate() method and ejbActivate() method it is noe printing it in the console.

Iam using J2EE1.2.1 application server.Even if i specify
j2ee -verbose also it is printing.

So how will i know whether passivation is occuring or acitivation is occuring.SO before passivation it should
invoke ejbpassivate and it should execute all the coding inside that method, but it is not comming.

I asked many people , but those people answers are all
not convincing to me...

This is my fifth java user group.none of the other
user group had answered thisquestion. Thoughit may look
silly,i hope that i will getsome response from this group


thank you










Please use html tags to format code blocks.

   <<Less

Re: When will the ejbPassivate and ejbActivate be invoked

Posted By:   Bozidar_Dangubic  
Posted On:   Tuesday, April 2, 2002 08:06 AM

the container will only passivate when it needs to passivate. if there is a heavy load on the server and ejb container needs more memory, it will passivate stateful session beans. but if you deploy a stateful session bean, get reference to it and wait for passivation, it may never occur. load the server with many users all getting access to the stateful session bean and you will see that as the load on the server increases, the container will passivate stateful session beans and will invoke ejbPassivate() and subsequently ejbActivate() when necessary.
About | Sitemap | Contact