Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4071694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:47:23+00:00 2026-05-20T16:47:23+00:00

I have a JMS Message Listener under JBoss 5.1, configured by Spring. Although the

  • 0

I have a JMS Message Listener under JBoss 5.1, configured by Spring. Although the ThreadPoolTaskExecutor is configured to have a core pool size of 15, I see that only one thread is serving requests, and the others are waiting. According to the ThreadPoolExecutor API I need to have a bounded queue, but I don’t see how spring allow me to do it.

Here is the configuration:

<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:/ConnectionFactory" />
    <property name="jndiTemplate" ref="jndiTemplate" />
</bean>

<bean id="destination" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="queue/someQueue" />
    <property name="jndiTemplate" ref="jndiTemplate" />
</bean>

<bean id="jmsReceiveDestinationResolver"
    class="org.springframework.jms.support.destination.JndiDestinationResolver">
    <property name="jndiTemplate" ref="jndiTemplate" />
</bean>

<bean id="someListener" class="com.company.SomeListener">
    <property name="..." ref="..." />
</bean>

<jms:listener-container connection-factory="connectionFactory"
    destination-type="queue" destination-resolver="jmsReceiveDestinationResolver" 
    task-executor="jmsTaskExecutor">
    <jms:listener destination="queue/someQueue" ref="messageListener" />
</jms:listener-container>

<bean name="jmsTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
    <property name="corePoolSize" value="15"/>
    <property name="maxPoolSize" value="50"/>       
    <property name="threadNamePrefix" value="some-queue-thread"/>
</bean>

Here is the stack trace of the 14 waiting threads:

"some-queue-thread7" prio=10 tid=0x000000004dcfc800 nid=0x1d90 waiting on condition [0x00000000435f7000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000070f5abad8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:662)

Notice this may similar to Spring ThreadPoolTaskExecutor only running one thread, but in my case the core pool size is larger than 1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:47:23+00:00Added an answer on May 20, 2026 at 4:47 pm

    Spring Reference says that you need to specify maximum number of concurrent consumers with <jms:listener-container concurrency = "15" ...>, otherwise it would be 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring JMS listener that receives a BytesMessage/JMSBytesMessage. I want to convert
I have a message handler, which consumes from a JMS queue and that sends
We have an application that processes JMS message using a message driven bean. This
I am new JMS arena, I have created multiple message listeners but one listener
I have configured (with spring) my application to listen to a jms que with
I have a standalone java application that fires up several JMS consumers using the
I have a system which contains multiple applications connected together using JMS and Spring
I use Spring-configured jms template with tibco jms library. I get jms connection factory
I have a simple Spring config for unit tests that includes ActiveMQ embedded broker,
I'm trying to send a JMS message from one JBoss AS 5.1 instance to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.