Announcement Announcement Module
Collapse
No announcement yet.
DefaultMessageListener causes jmsexception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DefaultMessageListener causes jmsexception

    Hi! Still playing around with weblogic9, spring 2.0RC4 and MDP's.
    Didnt see this earlier, but now its constant->

    DEBUG [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] JmsResourceHolder.closeAll(174) | Could not close JMS Connection after transact
    ion
    javax.jms.JMSException: [J2EE:160053]The JMS method stop may not be called inside an EJB or servlet
    at weblogic.deployment.jms.JMSExceptions.getJMSExcept ion(JMSExceptions.java:22)
    at weblogic.deployment.jms.PooledConnection.stop(Pool edConnection.java:226)
    at org.springframework.jms.connection.JmsResourceHold er.closeAll(JmsResourceHolder.java:167)
    at org.springframework.jms.connection.JmsTransactionM anager.doCleanupAfterCompletion(JmsTransactionMana ger.java:245)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.cleanupAfterCompletion(Ab stractPlatformTransactionManager.java:823)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.processCommit(AbstractPla tformTransactionManager.java:590)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:510)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer.receiveAndExecute(DefaultMessageLis tenerContainer.java:455)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.invokeL istener(DefaultMessageListenerContainer.java:859)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.run(Def aultMessageListenerContainer.java:825)
    at org.springframework.scheduling.commonj.DelegatingW ork.run(DelegatingWork.java:54)
    at weblogic.work.j2ee.J2EEWorkManager$WorkWithListene r.run(J2EEWorkManager.java:259)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :179)

  • #2
    Oh, and here's some configuration infos;

    <!-- containers -->
    <bean id="lListenerContainer"
    class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="destination" ref="requestDestination" />
    <property name="messageListener" ref="requestListener" />
    <property name="transactionManager" ref="jmsTransactionManager" />
    <property name="receiveTimeout" value="20000" />
    <property name="recoveryInterval" value="600000"/>
    <property name="concurrentConsumers" value="1" />
    </bean>

    <bean id="jmsTransactionManager"
    class="org.springframework.jms.connection.JmsTrans actionManager">
    <property name="connectionFactory" ref="connectionFactory" />
    </bean>

    Setting receiveTimeout to -1 will ofcource solve this..

    Comment


    • #3
      So I'll continue my journey with this one.

      We didnt have this problem reported in start of this thread with spring 2.0 rc3.
      So according to changelogs, JmsResourceHolder in rc4/current was changed so that it doesnt use JMSUtils class anymore, and it calls stop before closing transactional connection.

      So in weblogic 9 jmsresourceholder
      Code:
      		
      for (Iterator it = this.connections.iterator(); it.hasNext();) {
      			try {
      				Connection con = (Connection) it.next();
      				try {
      					con.stop();
      				}
      				finally {
      					con.close();
      				}
      			}
      			catch (Throwable ex) {
      				logger.debug("Could not close JMS Connection after transaction", ex);
      			}
      causes exception at con.stop() and thefore this method fails.
      Perhaps it would make sense to catch that exception?->
      Code:
      try {
           con.stop()
      } catch (JMSException ex) {
           //ignore?
      }

      Comment

      Working...
      X