• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB Passivate and EJB Remove for stateful Bean are not called by weblogic

 
Shodhan Shah
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys
I am running test set up on weblogic 8.1 for stateful and stateless session Beans.
Test clients run fine.
But for stateful session bean I am not able to passivate or remove the beans inspite of setting max-beans-in-cache ,idle-timeout-seconds(i.e. on Bean class ejbPassivate or ejbRemove methods are not invoked).

I am usiing following configuration for weblogic-ejb-jar.xml.
Can anyone tell why ejbPassivate and ejbRemove callbacks are not called by container though clients are idle for an hour.??

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>AdviceBeanStateful</ejb-name>
<stateful-session-descriptor>
<stateful-session-cache>
<max-beans-in-cache>2</max-beans-in-cache>
<idle-timeout-seconds>30</idle-timeout-seconds>
<cache-type>NRU</cache-type>
</stateful-session-cache>
</stateful-session-descriptor>
<jndi-name>headfirst/AdviceBeanStateful</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try different "cache-type". Check this link.
 
Shodhan Shah
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I tried with LRU and it worked. Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic