Results 1 to 5 of 5

Thread: concurrentConsumers and maxConcurrentConsumers behavior

  1. #1

    Question concurrentConsumers and maxConcurrentConsumers behavior

    Hello

    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 SUtils.java:1152)
    at com.evermind.server.jms.JMSUtils.toJMSException(JM SUtils.java:1123)
    at com.evermind.server.jms.EvermindConnection.assertS ession(EvermindConnection.java:511)
    at com.evermind.server.jms.EvermindConnection.createS ession(EvermindConnection.java:222)
    at org.springframework.jms.support.JmsAccessor.create Session(JmsAccessor.java:200)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer.access$1000(DefaultMessageListenerC ontainer.java:116)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.initRes ourcesIfNecessary(DefaultMessageListenerContainer. java:883)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.invokeL istener(DefaultMessageListenerContainer.java:869)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.run(Def aultMessageListenerContainer.java:810)
    at java.lang.Thread.run(Thread.java:595)
    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:

    Code:
      <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
          <props>
            <prop key="java.naming.factory.initial">com.evermind.server.ApplicationInitialContextFactory</prop>
            <prop key="java.naming.provider.url">ormi://localhost:9227/</prop>
          </props>
        </property>
      </bean>
    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 10.1.3.2.0

    Any help will be appreciated.

    Thank you

  2. #2
    Join Date
    Jun 2007
    Posts
    21

    Default

    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. #3
    Join Date
    Jun 2007
    Posts
    21

    Default

    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. #4
    Join Date
    Oct 2008
    Posts
    1

    Default

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

  5. #5
    Join Date
    Jun 2007
    Posts
    21

    Default

    You need to upgrade your OC4J to 10.1.3.4 that fixes the issue.

    10.1.3.3 was the last broken version.

    GL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •