users@glassfish.java.net

Limit concurrent requests to stateless ejb?

From: <forums_at_java.net>
Date: Thu, 24 Mar 2011 09:30:41 -0500 (CDT)

 
 

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