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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:18:01+00:00 2026-06-11T11:18:01+00:00

My app (a spring message listener) reads from a queue and writes to the

  • 0

My app (a spring message listener) reads from a queue and writes to the database in a single transaction. I use Atomikos to provide the XA transaction behaviour. When the app is abruptly terminated with kill statements for example, I see messages are lost. Is there any specific configuration I need to use? Should the queues be persistent? Currently the queues are non-persistent. My MQ version is v7.1.

Spring config for listener container looks like:

<bean id="listenerContainer" class="com.miax.test.TestListenerMDPImpl" autowire="byName">
    <property name="connectionFactory" ref="mqConnFactory" />
    <property name="destinationName" value="QUEUE" />
    <property name="messageListener" ref="listenerAdapter" />
    <property name="transactionManager" ref="jtaTransactionManager" />
    <property name="sessionTransacted" value="true" />
    <property name="concurrentConsumers" value="1" />
    <!-- receive time out, should be less than tranaction time out -->
    <property name="receiveTimeout" value="3000" />
    <!-- retry connection every 1 seconds -->
    <property name="recoveryInterval" value="1000" />
    <property name="autoStartup" value="true" />
    <property name="sessionAcknowledgeMode" value="0" />
</bean>

Any other info will be given as needed.

Thanks.

  • 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-06-11T11:18:02+00:00Added an answer on June 11, 2026 at 11:18 am

    The client you are using must be the Extended Transactional Client if downloaded prior to May of this year. Any of the V7.0.1 and higher clients as of May 2012 have the XA capability built in. If in doubt, go download a current release of the WMQ client and install.

    Second, the XA transaction manager must have it’s own connection to the queue manager independent of the application. This is so that it can connect and reconcile the transactions if the application fails to restart. To do this, the transaction manager must be configured with an XX_OPEN string and a switch file as described in the Infocenter topic Configuring XA-compliant transaction managers.

    For what its worth, there is no such thing as a persistent queue in WMQ. It is the messages themselves that are persistent (or not). For more on that, please see my blog post on the topic. This is a rather important topic because when people assume that the queue itself is persistent they tend to devise solutions that produce unexpected results. Please read the blog post!

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

Sidebar

Related Questions

I have a small Spring app that reads a few databases, and writes a
I recently upgraded my app from Spring 2.5.6 to Spring 3.0.0. A few days
I use Spring Security 3 in my jsf2 web app. When a non-authenticated user
I have a .NET console app that reads info from a USB stick and
I'm developing web app using Spring Integration to route my messages, but I have
I've got a spring-security setup in my web-app. I want to replace some messages
I read a bean code under spring-app.xml <bean id=mySessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean> <property name=dataSource ref=myDataSource />
I'm building a Google App Engine app using Spring 3.1 and am having a
I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
I cannot get my Spring web app to find my scripts. I have the

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.