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 7912237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:32:56+00:00 2026-06-03T13:32:56+00:00

I am working on a POC which does the following Uses a message driven

  • 0

I am working on a POC which does the following

  1. Uses a message driven channel adapter to recieve message in a transaction
  2. Calls the Service Activator which uses a handler to insert the message recieved from the adapter to DB and also post message to outbound channel.

Now, if the DB insert of the message fails i want the JMS message returned back to the queue so that it can be re-tried later.

With my below configuration it doesnt seems to work.(i.e. even if there is a failure while inserting into the database the message is removed from the queue.

Any pointers or sample configuration would be helpful.

<integration:channel id="jmsInChannel">         
    <integration:queue/>
</integration:channel>

<int-jms:message-driven-channel-adapter id="jmsIn"
    transaction-manager="transactionManager"
    connection-factory="sConnectionFactory"
    destination-name="emsQueue"
    acknowledge="client" channel="jmsInChannel"
    extract-payload="false"/>   

<integration:service-activator input-channel="jmsInChannel"
    output-channel="fileNamesChannel" ref="handler" method="process" />

<bean id="handler" class="com.irebalpoc.integration.MessageProcessor">
    <property name="jobHashTable" ref="jobsMapping" />
</bean>
  • 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-03T13:32:57+00:00Added an answer on June 3, 2026 at 1:32 pm

    Set acknowledge=”transacted” and, I presume the transactionManager is a JDBC (or JTA) transaction manager.

    You also need to remove <queue/> from JmsInChannel so that the database transaction occurs on the same thread.

    Spring will synchronize the database transaction with the JMS transaction.

    However, read http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html for the implications.

    If you can’t make your service idempotent, you may need to look at an XA transaction manager.

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

Sidebar

Related Questions

Am working on a POC for self learning in which I want to keep
Working with Linq2Sql as a driver for a Wcf Service. Lets go bottom up....
I'm working on a proof-of-concept application, containing a WCF service with console host and
I am working on a POC currently using Jenkins as CI server. I have
Working on a PoC of a project that streams data from USB via Wifi:
I'm working on putting together a simple POC app using Fluent NHibernate to attempt
I am currently working on a project with which I need to program up
I am currently working on some POC using JS Tree plugin and related check
Working with python interactively, it's sometimes necessary to display a result which is some
The POC: https://gist.github.com/1197309 I would like to determine which of the three runs ./prime

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.