[jboss-jira] [JBoss JIRA] (WFLY-4330) Async service with EJB pool blocks threads not used
Janario Oliveira (JIRA)
issues at jboss.org
Thu Jun 25 18:46:02 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084084#comment-13084084 ]
Janario Oliveira commented on WFLY-4330:
----------------------------------------
Yes that's true
The idea is:
Once AsyncService is limited to 5 instances it should not block other threads more than the bean pool size
So sending 15 jobs to AsyncService where each one keep 2 seconds to finish (amount around 30 seconds)
After made the 15 calls to AsyncService, invoking another call to another bean in another pool StatelessService (default slsb) should not wait the first 15 jobs once the pool was limited
So the log happens when the call to StatelessService was bigger than 2 seconds. This means that AsyncService is blocking all threads even with a reduced pool
> Async service with EJB pool blocks threads not used
> ---------------------------------------------------
>
> Key: WFLY-4330
> URL: https://issues.jboss.org/browse/WFLY-4330
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 8.2.0.Final
> Reporter: Janario Oliveira
> Assignee: Bartosz Baranowski
> Attachments: wildfly-thread-pool.zip
>
>
> I've created a bean pool to limit the number of some instances. In that case maximum 5 instances.
> <pools>
> <bean-instance-pools>
> <strict-max-pool name="slsb-max5" max-pool-size="5" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
> ...
> </bean-instance-pools>
> </pools>
> The idea was to have some async service that work simultaneous.
> @Stateless
> @Pool("slsb-max5")
> public class AsyncService {
> @Asynchronous
> public Future<LocalDateTime> async2Seconds() {
> //some parallel work...
> }
> }
> The problem is when I invoke simultaneous more than 5 times it blocks the threads even it is not using (async thread-pool-name="default", default=10)
> Attached an example project (configure slsb-max5 pool and access /test-thread-pool/rest/async-resource)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list