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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:08:34+00:00 2026-06-07T08:08:34+00:00

I am trying to implement transactions for distributed services in java over REST. I

  • 0

I am trying to implement transactions for distributed services in java over REST. I have some questions to ask.

  1. What happens when resources reply affirmatively and in phase 2 they fail to commit?
  2. I tried to search but unfortunately I could not find a proper answer to what happens when rollback fails in 2PC protocol. I know that its a blocking protocol and it waits for response for infinite time, but what happens in real world scenario?
  3. what are the other protocols for distributed transaction management?
  4. I read about JTA for transaction implementation, but is there any other implementation which can be used to implement transactions?
    Any reply will be helpful. Thanks in advance.
  • 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-07T08:08:38+00:00Added an answer on June 7, 2026 at 8:08 am

    I don’t have answers to these questions but I created a specific method for my specific case. So posting here if some one need transactions for the same cases.

    Since In my case there is no change to current entries in database (or indexer, which is also running as a service) but there were only new entries in system at different places, so the false failures were not harmful but false success were. So for my particular case I followed following strategy:

    i. All the resources adds a transaction id with the row in database. In first phase when coordinator ask resources, all resources makes entries in database with transaction id generated by coordinator.

    ii. After phase 1, when all resources reply affirmatively that means resources have made changes to database, coordinator makes an entry in it’s own log that transaction is successful and conveys the same to resources. All resources makes the transaction status successful in the row of data inserted.

    iii. A service run continuously to search the database and correct the transaction status by asking the status from coordinator. If there is no entry or failure entry, transaction returns failure status, and same is updated on service. When fetching data, if there is an entry in database which has failure label, then it always checks the transaction status with coordinator, if there is no entry of failure it filters the results. Hence those data entries are not supplied for which there is no information or there is failure information. So the outcome is always consistent.

    This strategy provides a way for atomicity for my case.

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

Sidebar

Related Questions

I am working on distributed transactions. I am trying to implement XA transaction using
we have a ASP.NET site with a SQL2008 DB. I'm trying to implement transactions
Rrom C#, reading/writing over SOCKET to JAVA and having some concurrency/socket issue. I am
I'm trying to implement a simple DAO. I have a Dao: @Repository(iUserDao) @Transactional(readOnly =
MY PLATFORM: PHP & mySQL MY SITUATION: I am trying to implement transactions within
I'm trying to implement a Hibernate persistence layer in a Java application and I'm
I have been trying to implement the Authorize.NEt SIM Method using the information given
I'm trying to get a handle on how to implement threading in a Java
I am trying to implement basic user/roles A user can have zero to many
I am trying to implement nhibernate transaction handling through Interceptors and couldn’t figure out

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.