0 Replies Latest reply on Jan 21, 2009 8:08 AM by Paul Carroll

    Stateful Session Bean Cache Policy

    Paul Carroll Newbie

      I have a stateful session bean in my application. When a user performs a search in the application, the stateful session bean is used so that the results may be paged through even if a user does not click next page for quite some time. I seem to be running into a situation where JBoss passivates several stateful session beans one after the other. This appears to be taking up a lot of system resources and the remainder of the application seems to hang or at least performance has degraded significantly while JBoss completes this operation. I would like some advice as to how I should tweak my container-cache-conf settings so that I do not get so many passivations at one time. Thanks.

      <container-cache-conf>
       <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>
       <cache-policy-conf>
       <min-capacity>50</min-capacity>
       <max-capacity>1000000</max-capacity>
       <remover-period>1800</remover-period>
       <max-bean-life>28800</max-bean-life>
       <overager-period>300</overager-period>
       <max-bean-age>600</max-bean-age>
       <resizer-period>400</resizer-period>
       <max-cache-miss-period>60</max-cache-miss-period>
       <min-cache-miss-period>1</min-cache-miss-period>
       <cache-load-factor>0.75</cache-load-factor>
       </cache-policy-conf>
      </container-cache-conf>
      <container-pool-conf>
       <MaximumSize>250</MaximumSize>
      </container-pool-conf>
      


      I also get this exception when many beans are being passivated: EJBException: Could not passivate Too many open files.