users@glassfish.java.net

Re: Limit concurrent requests to stateless ejb?

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Thu, 24 Mar 2011 14:49:06 -0700

There is a note in GF docs saying that pool settings do not apply to the
beans that are in use. The throughput is usually guarded by the number
of threads available to serve the requests. Please file an RFE if you
need to have a combined limit on the pooled and in-use bean instances.

thanks,
-marina

forums_at_java.net wrote:
>
>
>
> I am doing research on trying to throttle the number of concurrent
> requests
> that a stateless ejb can handle. In reading documentation, I thought
> that I
> could simply add this section to the sun-ejb-jar.xml deployment
> descriptor,
> and the ejb container would honor this setting to limit the available
> pool
> size to a maximum of 6....
> <bean-pool>
> <steady-pool-size>1</steady-pool-size>
> <resize-quantity>2</resize-quantity>
> <max-pool-size>6</max-pool-size>
>
> <pool-idle-timeout-in-seconds>600</pool-idle-timeout-in-seconds>
> </bean-pool>
> In testing though, it appears that the configuration is totally
> ignored. The
> way that I tested is to write a very simple ejb that gets a request,
> writes a
> log file entry, sleeps for 20 seconds, and the writes another log file
> entry.
> Then I used a SoapUI test case to send 60 concurrent requests through
> to see
> what would be logged from the ejb. I expected to only see 6 log
> entries at a
> time, but I saw 50 - meaning that 50 concurrent requests were processed.
> After digging around, I figured out that the HTTP Service request
> processing
> thread count was set to 50, and therefore limiting the overall number of
> concurrent requests from exceeding 50, so that explains why all 60 of the
> requests were not processed at once, but I am still stumped as to why the
> bean-pool setting was not honored. Furthermore, the global maximum
> pool size
> for the EJB container is set to 32, so it seems that is not being honored
> either. I am sure that there is something that I am missing, so hopefully
> someone on here can point me in the right direction. We are on GF 2.1.1.
> Thanks in advance,
> Josh
>
> --
>
> [Message sent by forum member 'josh.arnold']
>
> View Post: http://forums.java.net/node/784779
>
>