Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PrePassivate and PostActivate

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where and how does the container knows that it has to Passivate a bean?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The spec leaves the container provider free to deal with this. It may depend on a timeout (bean not being used) , or on some resources getting low. I think that some container will let you configure some of it.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or it could be configurable in the DD?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. I think it will be configured in the container's own descriptor file.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not convinced. Anyways thanks for the help Christophe.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not convinced.

For example, look at JBoss. These kind of settings can be done in jboss.xml.
 
Rajesh So
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christophe,

Could you please help me on the container settings in Glassfish, so that the @prePassivate can be invoked.

Regards,
Raj
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go to the Admin Console (http://localhost:4848/). Go to Configuration/EJB Container. You can change the value for Cache Idle Timeout. (It defaults to 600 seconds)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic