2 Replies Latest reply on Mar 18, 2003 5:28 PM by davidjencks

    limit number of concurrent invocations of SLSB

    mgrove

      i have a stateless session bean that is used by a stand alone java client. the client is multithreaded, and invokes methods on the SLSB.

      the app server i'm porting from had a configuration setting that let me limit the number of concurrent invocations of the SLSB. if a new invocation attempt beyond this limit occurred, the call would block until a currently running invocation completed.

      i'd like to know if there's a similar configuration setting in jboss. using jboss 3.0.4 with tomcat 4.1.12.

      thanks.

      -mike

        • 1. Re: limit number of concurrent invocations of SLSB
          mgrove

          an update...i tried using the MaximumSize and strictMaximumSize settings in my ejb's jboss.xml file. i added the following content:

          <container-configurations>
          <container-configuration extends="Standard Stateless SessionBean">
          <container-name>My Stateless SessionBean</container-name>
          <container-pool-conf>
          1 true
          </container-pool-conf>
          </container-configuration>
          </container-configurations>

          i also associated my SLSB with this configuration via a

          <configuration-name>My Stateless SessionBean</configuration-name>

          entry below the ejb-name tag of my session bean.

          this setting does not appear to have an effect on the number of concurrent invocations of the SLSB (perhaps i misunderstand the documentation on MaximumSize and it's not supposed to). i notice that regardless of whether i

          1) do a full lookup/narrow/create of the EJB in each thread
          2) share the EJB remote reference across threads
          3) share the EJB home reference across threads, and have each thread do a create() to get the remote reference

          i'm able to do much more than MaximumSize concurrent invocations of the SLSB method. basically, the behavior i see is the same i'd see if i did not set MaximumSize.

          any ideas?

          • 2. Re: limit number of concurrent invocations of SLSB
            davidjencks

            The strictMaximumSize functionality, while present in some 2.4 versions, was not added to 3.0.x until 3.0.5. So the best bet is to upgrade to 3.0.6 or even 3.2.