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:
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 this setting is higher than "concurrentConsumers", the listener container will dynamically schedule new consumers at runtime, provided that enough incoming messages are encountered
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:
I suspect the problem might be my JndiTemplate, I am not sure if the following is correct: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 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.0Code:<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>
Any help will be appreciated.
Thank you


Reply With Quote