[jboss-jira] [JBoss JIRA] (WFLY-8516) Documentation in the XSD for the queue-length is incorrect based on the model description

Teresa Miyar (JIRA) issues at jboss.org
Fri Apr 7 02:45:00 EDT 2017


     [ https://issues.jboss.org/browse/WFLY-8516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Teresa Miyar updated WFLY-8516:
-------------------------------
    SourceForge Reference: https://gss--c.na7.visual.force.com/apex/Case_View?id=500A000000WlgHT&sfdc.override=1


> Documentation in the XSD for the queue-length is incorrect based on the model description
> -----------------------------------------------------------------------------------------
>
>                 Key: WFLY-8516
>                 URL: https://issues.jboss.org/browse/WFLY-8516
>             Project: WildFly
>          Issue Type: Bug
>          Components: EE
>            Reporter: James Perkins
>            Assignee: James Perkins
>              Labels: concurrency
>
> The documentation for in the XSD for the {{queue-length}} on the {{managed-executor-service}} states:
> {quote}
>                 A managed executor service (implementing javax.enterprise.concurrent.ManagedExecutorService).
>                 If the "thread-factory" attribute is not defined a managed thread factory with no context service and normal thread priority will be created and used by the executor.
>                 The task queue is based on the values of "core-threads" and "queue-length":
>                 * If "queue-length" is 0, or "queue-length" is Integer.MAX_VALUE (2147483647) and "core-threads" is 0, direct handoff queuing strategy will be used and a SynchronousQueue will be created.
>                 * If "queue-length" is Integer.MAX_VALUE but "core-threads" is not 0, an unbounded queue will be used.
>                 * For any other valid value for "queue-length", a bounded queue wil be created.
> {quote}
> The model description states:
> {quote}
> The executors task queue capacity. A length of 0 means direct hand-off and possible rejection will occur. An undefined length (the default), or Integer.MAX_VALUE, indicates that an unbounded queue should be used. All other values specify an exact queue size. If an unbounded queue or direct hand-off is used, a core-threads value greater than zero is required.
> {quote}
> The two descriptions should match. The model validation should also be checked as one of the messages doesn't seem to be correct:
> {code:java}
> // Validate an unbounded queue
> if (!queueLength.isDefined() || queueLength.asInt() == Integer.MAX_VALUE) {
>     if (coreThreads.isDefined() && coreThreads.asInt() <= 0) {
>         throw EeLogger.ROOT_LOGGER.invalidCoreThreadsSize(coreThreads.asString());
>     }
> }
> {code}
> That message doesn't really describe the real problem and will always be
> {quote}
> WFLYEE0112: The core-threads value must be greater than 0 when the queue-length is 0
> {quote}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list