[
https://issues.jboss.org/browse/AS7-5449?page=com.atlassian.jira.plugin.s...
]
Brian Stansberry commented on AS7-5449:
---------------------------------------
You have to make a web request to trigger use of the thread pool and creation of a
thread.
I configured the threads subsystem as shown, added the
executor="ConnectorThreadPool" attribute to the web subsystem http connector
instead of ajp to avoid the need to get httpd in the middle, then requested
http://localhost:8080
14:16:41,073 ERROR [org.apache.tomcat.util] (http-/127.0.0.1:8080-Acceptor-0) JBWEB003011:
Error allocating socket processor: java.lang.IllegalArgumentException
at java.lang.Thread.setPriority(Thread.java:1076) [classes.jar:1.6.0_37]
at org.jboss.threads.JBossThreadFactory.createThread(JBossThreadFactory.java:127)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at org.jboss.threads.JBossThreadFactory.newThread(JBossThreadFactory.java:101)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
[classes.jar:1.6.0_37]
at
java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
[classes.jar:1.6.0_37]
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652)
[classes.jar:1.6.0_37]
at org.jboss.threads.JBossThreadPoolExecutor.execute(JBossThreadPoolExecutor.java:63)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at
org.jboss.threads.DelegatingBlockingExecutorService.execute(DelegatingBlockingExecutorService.java:42)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at org.jboss.as.threads.ManagedExecutorService.execute(ManagedExecutorService.java:64)
[jboss-as-threads-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.apache.tomcat.util.net.JIoEndpoint.processSocket(JIoEndpoint.java:1219)
[jbossweb-7.2.0.Alpha5.jar:7.2.0.Alpha5]
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:311)
[jbossweb-7.2.0.Alpha5.jar:7.2.0.Alpha5]
at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37]
when defining custom executor for connector thread priority is not
optional
---------------------------------------------------------------------------
Key: AS7-5449
URL:
https://issues.jboss.org/browse/AS7-5449
Project: Application Server 7
Issue Type: Bug
Affects Versions: 7.1.2.Final (EAP)
Reporter: Mathieu Lachance
Assignee: Bartosz Baranowski
when defining a custom executor in the threads subsystem for the connector defined in the
web subsystem like :
{code:xml}
<subsystem xmlns="urn:jboss:domain:threads:1.1">
<thread-factory name="ConnectorThreadFactory"
group-name="ConnectorThreadPool"/>
<unbounded-queue-thread-pool name="ConnectorThreadPool">
<max-threads count="500"/>
<keepalive-time time="60" unit="seconds"/>
<thread-factory name="ConnectorThreadFactory"/>
</unbounded-queue-thread-pool>
</subsystem>
<subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
<connector name="ajp" protocol="AJP/1.3"
scheme="http" socket-binding="ajp" redirect-port="8443"
executor="ConnectorThreadPool"/>
</subsystem>
{code}
it will fail with :
{quote}
17:19:06,508 ERROR [org.apache.tomcat.util.net.JIoEndpoint]
(http-/0.0.0.0:8443-Acceptor-0) Error allocating socket processor:
java.lang.IllegalArgumentException
at java.lang.Thread.setPriority(Thread.java:1058) [rt.jar:1.6.0_31]
at org.jboss.threads.JBossThreadFactory.createThread(JBossThreadFactory.java:127)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at org.jboss.threads.JBossThreadFactory.newThread(JBossThreadFactory.java:101)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
[rt.jar:1.6.0_31]
at
java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
[rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652)
[rt.jar:1.6.0_31]
at
org.jboss.threads.JBossThreadPoolExecutor.execute(JBossThreadPoolExecutor.java:63)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at
org.jboss.threads.DelegatingBlockingExecutorService.execute(DelegatingBlockingExecutorService.java:42)
[jboss-threads-2.0.0.GA.jar:2.0.0.GA]
at
org.jboss.as.threads.ManagedExecutorService.execute(ManagedExecutorService.java:64)
[jboss-as-threads-7.1.2.Final.jar:7.1.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint.processSocket(JIoEndpoint.java:1237)
[jbossweb-7.0.16.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:325)
[jbossweb-7.0.16.Final.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
{quote}
even though if documentation state that thread priority is optional :
{code:xml}
<xs:complexType name="thread-factory">
<xs:annotation>
<xs:documentation>
<![CDATA[
A thread factory (implementing java.util.concurrent.ThreadFactory). The
"name" attribute is
the bean name of the created thread factory. The optional
"priority" attribute may be used to specify
the thread priority of created threads. The optional
"group-name" attribute specifies the name of a the
thread group to create for this thread factory.
The "thread-name-pattern" is the template used to create names
for threads. The following patterns
may be used:
%% - emit a percent sign
%t - emit the per-factory thread sequence number
%g - emit the global thread sequence number
%f - emit the factory sequence number
%i - emit the thread ID
%G - emit the thread group name
]]>
</xs:documentation>
</xs:annotation>
<xs:attribute name="name" type="xs:string"
use="required"/>
<xs:attribute name="group-name" type="xs:string"
use="optional"/>
<xs:attribute name="thread-name-pattern" type="xs:string"
use="optional"/>
<xs:attribute name="priority" type="priority"
use="optional"/>
</xs:complexType>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira