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

James Perkins (JIRA) issues at jboss.org
Wed Apr 12 19:07:00 EDT 2017


James Perkins created WFLY-8572:
-----------------------------------

             Summary: Documentation in the XSD for the queue-length is incorrect based on the model description
                 Key: WFLY-8572
                 URL: https://issues.jboss.org/browse/WFLY-8572
             Project: WildFly
          Issue Type: Bug
          Components: EE
            Reporter: James Perkins
            Assignee: James Perkins


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