2 Replies Latest reply on Oct 10, 2003 5:26 PM by demiante

    configure : instance-pool/instance-cache

      Hi,

      I am trying to configure my stateful session bean. But I don't understand the difference between "the instance-pool" and the "instance cache". When I change the parameters (cache-policy-conf) as "min-capacity", "max-capacity" and "max-bean-age" I see that the ejbActivate method and ejbPassivate are called. But when I change the parameter (container-pool-conf) as "MaximumZise" I do not see change.

      <cache-policy-conf>
      <min-capacity>1</min-capacity> <max-capacity>3</max-capacity>
      <remover-period>1800</remover-period>
      <max-bean-life>1800</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>
      1 1 true
      </container-pool-conf>


      Can you give an explanation between instance-pool and instance-cache.

      Thanks.

      Christophe.

        • 1. Re: configure : instance-pool/instance-cache

          The pool is a collection of unassociated beans.
          When a request comes in, a bean is selected from the
          pool and attached to a bean context.
          When the request finishes, the bean is removed from the
          context and placed back in the pool, unless...

          If you have a cache, the bean may be placed in the cache
          and not returned to the pool after the request. In future
          when somebody asks for the same key (either the internal
          session key for Stateful Session beans or the primary key
          for entity beans) the same bean is reused.

          If the cache is too full or an error occurs while using
          the bean, the bean can be passivated which involves
          removing the context and maybe returning the bean
          to the pool.

          In simpler terms:
          The pool is a collection of "raw" EJBs with no data
          (all equivalent)
          The cache is a collection of EJBs associated with
          some data (none are equivalent to each other).

          Regards,
          Adrian

          • 2. Re: configure : instance-pool/instance-cache
            demiante

            Hello Adrian and folks,
            I read the Jboss Administration (payed documentation) and looked in the net but I didn't get this questions answered entirely yeat:

            1)What is cache miss?
            2)When it happens? in what cases?

            My only hint is when the cache is full, like number-of-beans-activate = max-capacity-of-cache and another bean must to be create so the LRU bean must to be passivate.
            If the cache miss only occurs in this case that i mentioned so why the resizer task limit the enlargement of the cache to the size of the <max-capacity> tag value?

            I don't know if I get my questions understood but i appreciate any help,

            Regards,
            Vinicius