Announcement Announcement Module
No announcement yet.
concurrentConsumers and maxConcurrentConsumers behavior Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • concurrentConsumers and maxConcurrentConsumers behavior


    I need a queue to handle more than one message concurrently, thus I have a DefaultMessageListenerContainer with it's maxConcurrentConsumers property set to 5 and concurrentConsumers set to 1. The documentation states:

    If this setting is higher than "concurrentConsumers", the listener container will dynamically schedule new consumers at runtime, provided that enough incoming messages are encountered
    However this is not the behavior I see when I send 5 messages to the queue, they are processed but not concurrently. The second message is read only when the first one is finished and so on.

    If I instead set the property concurrentConsumers to 5, now I get the expected behavior, the 5 messages are read concurently but now the problem is I keep receiving the following error message every few seconds eternally:

    2008-01-29 00:09:50,505 ERROR [org.springframework.jms.listener.DefaultMessageLis tenerContainer] - Setup of JMS message listener invoker failed - trying to recover
    javax.jms.JMSException: Connection[Oc4jJMS.Connection.catcoeda0251.4828b17f:117c2e096 f7:-8000.1]: cannot create new session inside J2EE container when Session[Oc4jJMS.Session.catcoeda0251.4828b17f:117c2e096f7:-8000.2,false,AUTO_ACKNOWLEDGE] is currently active.
    at com.evermind.server.jms.JMSUtils.make(JMSUtils.jav a:1072)
    at com.evermind.server.jms.JMSUtils.toJMSException(JM
    at com.evermind.server.jms.JMSUtils.toJMSException(JM
    at com.evermind.server.jms.EvermindConnection.assertS ession(
    at com.evermind.server.jms.EvermindConnection.createS ession(
    at Session(
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer.access$1000(DefaultMessageListenerC
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.initRes ourcesIfNecessary(DefaultMessageListenerContainer. java:883)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.invokeL istener(
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$
    2008-01-29 00:09:50,552 INFO [org.springframework.jms.listener.DefaultMessageLis tenerContainer] - Successfully refreshed JMS Connection
    I suspect the problem might be my JndiTemplate, I am not sure if the following is correct:

      <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <prop key="java.naming.factory.initial">com.evermind.server.ApplicationInitialContextFactory</prop>
            <prop key="java.naming.provider.url">ormi://localhost:9227/</prop>
    I am a little lost at this point since I noticed I can put any other port number and this makes absolutely no difference, I mean the queue is still able to listen and process messages while throwing the above error, are my java.naming.factory.initial and java.naming.provider.url correct? 9227 is the port number configured in my jms.xml file. I am currently trying to run this jms queue under embedded oc4j, jdeveloper

    Any help will be appreciated.

    Thank you

  • #2
    Bumping this.

    More information:
    The problem occurs when multiple sessions are opened on a single jms queue in oc4j 10 and higher...
    With oc4j 9 it works just fine.

    concurrentconsumers=1 works, however, as soon as you use the same queue in another application, you get errors. Or if you change concurrentconsumers to anything higher than 1.

    This seems to be an oc4j configuration issue, however I have been unable to find anything at all in 3 hours. I will be posting on oracle forums and if I get a solution, I'll update this as well...


    • #3
      Bumping this again...

      I have created a SR request in metalink. Initial response from oracle is that it is possible a bug in their oc4j 10 container.

      I have uploaded a simple test case application and they are currently investigating it.


      • #4
        Any update from Oracle on this issue? I just encountered the same problem when trying to increase concurrentConsumers (I'm using Oracle Application Server


        • #5
          You need to upgrade your OC4J to that fixes the issue.

 was the last broken version.