aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB Passivate and EJB Remove for stateful Bean are not called by weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB Passivate and EJB Remove for stateful Bean are not called by weblogic" Watch "EJB Passivate and EJB Remove for stateful Bean are not called by weblogic" New topic
Author

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

Shodhan Shah
Greenhorn

Joined: Apr 27, 2006
Posts: 18
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

Joined: Feb 02, 2006
Posts: 2023
Try different "cache-type". Check this link.
Shodhan Shah
Greenhorn

Joined: Apr 27, 2006
Posts: 18
Yes. I tried with LRU and it worked. Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB Passivate and EJB Remove for stateful Bean are not called by weblogic