Announcement Announcement Module
Collapse
No announcement yet.
Threads and Transaction. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Threads and Transaction.

    Hi Guys
    I am stuck in the following scenario.Please advice me on this

    There is an inbound Queue
    There is an Main thread running(We are not using JMS Listener )
    and picking a message from the queue and process the message
    and start another sub thread to process again.

    Now the problem is How can i handle the transaction in the main thread and sub thread as well.
    which mean when i process the message in main thread say some Data Base access error occurs
    so i want to rollback the message back to inbound Queue.
    and if the same failure occurs in sub thread which was created by the main thread, the retrieved message should rollback to inbound Queue.

    I have walked through the JMS Spring Reference ,But they are demarcate the transaction only to JMS Listeners
    So How can i apply the transaction concept in my scenario
    Please advice me ,If you have any sample program please share with me .That would be better to understand your concepts

    Thanks and Regards
    Dominic
    Junior Developer
    Last edited by SpringBuddy; Aug 3rd, 2010, 03:02 AM. Reason: Grammer

  • #2
    Originally posted by SpringBuddy View Post
    Hi Guys
    I am stuck in the following scenario.Please advice me on this

    There is an inbound Queue
    There is an Main thread running(We are not using JMS Listener )
    and picking a message from the queue and process the message
    and start another sub thread to process again.

    Now the problem is How can i handle the transaction in the main thread and sub thread as well.
    which mean when i process the message in main thread say some Data Base access error occurs
    so i want to rollback the message back to inbound Queue.
    and if the same failure occurs in sub thread which was created by the main thread, the retrieved message should rollback to inbound Queue.

    I have walked through the JMS Spring Reference ,But they are demarcate the transaction only to JMS Listeners
    So How can i apply the transaction concept in my scenario
    Please advice me ,If you have any sample program please share with me .That would be better to understand your concepts

    Thanks and Regards
    Dominic
    Junior Developer
    HI, Have you solved this problem? I think I have the same scenario as you.

    Comment

    Working...
    X