2 Replies Latest reply on Mar 8, 2004 4:50 AM by yxyang

    Entity Bean instance cache Question

      Hello,

      Anyone can help me about this?

      I configured a container-configuration by extending Standard CMP 2.x EntityBean (see the end of this post).
      I tried to config a big cache size for this entity bean. And when the program is running, i use the jmx-console to
      monitor the cache size by clicking: jbos:j2ee jndiName=local/UsernamePasswordEJB,plugin=cache,service=EJB.

      In the MBean view, i observed that the cachesize resizes to zero after A FEW SECONDs (1 or 2) although i am sure there are almost
      100 entity bean records are accessed and the < resize-period > is set to half an hour. (Note: This entity bean is not read-only.)

      Q1: why does the cache size change to zero? I expected that it will be equal to the number of the records accessed and will keep
      as this value within half an hour.

      Q2: If the cache becomes to zero within a few seconds,the cache doesn't benefit us. am i right?

      Q2: Beside the container-cache-conf options, any other factors affect the cache size? I.e.,does the invocation of setXXX(...) on the entity bean will
      affect the cache of the entity beans? If so, any other option to solve this problem?

      Q3: Because i used commit option D, what is the unit of < optiond-refresh-rate > option? second?

      Q4: Sometimes, i got the following warn:
      "Unable to passivate due to ctx lock, id=........."
      What does this warn mean?

      -----------------------------configurations of the jboss.xml file ------------------------------------
      < container-configuration extends="Standard CMP 2.x EntityBean" >
      < container-name >Customized EntityBean< /container-name >
      < sync-on-commit-only >true< /sync-on-commit-only >
      < container-cache-conf >
      < min-capacity >500< /min-capacity >
      < max-capacity >1000000< /max-capacity >
      < overager-period >3600< /overager-period >
      < max-bean-age >7200< /max-bean-age >
      < resize-period >1800< /resize-period >
      < max-cache-miss-period >1800< /max-cache-miss-period >
      < min-cache-miss-period >10< /min-cache-miss-period >
      < cache-load-factor >0.75< /cache-load-factor >
      < /container-cache-conf >
      < container-pool-conf >
      < MaximumSize >1000< /MaximumSize >
      < /container-pool-conf >
      < commit-option >D< /commit-option >
      < container-configuration >

      < entity >
      < ejb-name >UsernamePasswordEJB< /ejb-name >
      < local-jndi-name >local/UsernamePasswordEJB< /local-jndi-name >
      < configuration-name >Customized EntityBean< /configuration-name >
      < /entity >
      -----------------------------configurations of the jboss.xml file ------------------------------------


      Thanks

      yang