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

  • Home
  • SEARCH
  • 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 7413397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:41:18+00:00 2026-05-29T06:41:18+00:00

I have a simple Spring config for unit tests that includes ActiveMQ embedded broker,

  • 0

I have a simple Spring config for unit tests that includes ActiveMQ embedded broker, JMS producer and JMS listener. Tests are passed successfully, but when shutting everything down I see some exceptions. Like this:

[ WARN] [ActiveMQ Connection Executor: tcp://localhost/127.0.0.1:61616 03:16:23] (SingleConnectionFactory.java:onException:301) Encountered a JMSException - resetting the underlying JMS Connection
javax.jms.JMSException: java.io.EOFException

My configuration:

<beans>
  <amq:queue id="defaultDestination" physicalName="example.A"/>
  <bean id="jmsProducerTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="defaultDestination" ref="defaultDestination"/>
  </bean>

  <bean id="jmsMessageSender" class="package.JMSMessageSender"/>

  <amq:broker id="broker" useJmx="false" persistent="false" destroyApplicationContextOnStop="true" >
    <amq:transportConnectors>
      <amq:transportConnector uri="tcp://localhost:61616"/>
    </amq:transportConnectors>
  </amq:broker>

  <bean id="messageListener" class="package.MessageReceiver"/>

  <bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory" depends-on="broker">
    <property name="targetConnectionFactory">
      <amq:connectionFactory brokerURL="tcp://localhost:61616"/>
    </property>
  </bean>

  <jms:listener-container connection-factory="connectionFactory" container-type="default">
    <jms:listener destination="example.A" ref="messageListener"/>
  </jms:listener-container>
</beans>

I supposed that broker is closing and then connection factory loses connection. But depends-on has not helped.
Thanks for your help.

  • 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-29T06:41:18+00:00Added an answer on May 29, 2026 at 6:41 am

    Ad far as I can tell, there is no way to shut down the embedded AMQ without these exceptions. The AMQ code treats that EOF as a relatively harmless event, but it does log that exception. You could try opening a JIRA at the Apache ActiveMQ project.

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

Sidebar

Related Questions

I have a simple app that use org.springframework.jdbc.datasource.DataSourceTransactionManager to manage the transactions. My spring
I have the following class (from a simple Spring tutorial) public class CarValidator implements
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I have what seems like a simple problem. I have a Spring web app,
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
I have a simple Dictionary(of String, Object) that I need to iterate through and
I have a very very simple SQL string that MS Access doesn't seem to
My setup is fairly simple: I have a web front-end, back-end is spring-wired. I
This is driving me nuts. I have a simple spring app with just a
I try to run a simple aop example in this site. I have spring

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.