3 Replies Latest reply on May 15, 2003 6:33 AM by adrian.brock

    Stateful bean and pool

      Hi,

      I have developed a Stateful Bean and I would like just 2 instances in the pool.
      so, I have added this parameter in the jboss.xml :
      <container-pool-conf>
      2
      </container-pool-conf>

      I wonder if this configuration is correct because it seems that this parameter has no effect.

      Can you say me if that is the good parameter for my problem?

      Thanks in advance,

      Christophe.

        • 1. Re: Stateful bean and pool

          No, stateful beans are controlled by the cache.

          If the cache fills up, they are passivated to disk
          and then removed after inactivity.

          I assume you want only two instances of
          whatever it is doing active at any one time.

          You can do this using for stateless beans using
          2

          This was broken in jboss until recent releases.

          Regards,
          Adrian

          • 2. Re: Stateful bean and pool

            Thanks for your response.

            where do I have to put this parameter in the file?

            In fact I searched in the docummentation :"quick Start", but I didn't find samples or explications about parameters of jboss.xml file.
            can you gives me one URL that describe the differentes parameters ?

            thank you.

            Christophe.

            • 3. Re: Stateful bean and pool

              Here's the dtd section,
              my bad strictMaximumSize is a boolean.

              <!--
              The container-pool-conf element holds configuration data for the
              instance pool.
              jboss does not read directly the subtree for this element: instead,
              it is passed to the instance pool instance (if it implements
              org.jboss.metadata.XmlLoadable) for it to load its parameters.

              The default instance pools, EntityInstancePool and
              StatelessSessionInstancePool, both accept the following configuration.

              Used in: container-configuration
              -->
              <!ELEMENT container-pool-conf (MinimumSize?, MaximumSize?,
              strictMaximumSize?, strictTimeout?)>

              <!-- The theoretical minimum size of the pool. Currently unused by JBoss
              pools.
              -->
              <!ELEMENT MinimumSize (#PCDATA)>

              <!--
              The capacity of the Pool. For pools where reclaim is possible, the pool will
              also be repopulated when the instance is free to be reused.
              This is not an hard limit, if instances are needed when the pool is at
              its MaximumSize, new instances will be created following the demand unless
              a strictMaximumSize of true is specified.

              Used in: container-pool-conf and invoker-proxy-conf for JMSContainerInvoker
              -->
              <!ELEMENT MaximumSize (#PCDATA)>

              <!-- A boolean flag indicating if attempts to access the pool will block when
              MaximumSize instances are active. The default is false.

              Used in: container-pool-conf
              -->
              <!ELEMENT strictMaximumSize (#PCDATA)>

              <!-- The time in milliseconds to wait for the strictMaximumSize semaphore. The
              default is Long.MAX_VALUE or essentially enternity.

              Used in: container-pool-conf
              -->
              <!ELEMENT strictTimeout (#PCDATA)>

              Regards,
              Adrian