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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:55:01+00:00 2026-05-31T20:55:01+00:00

I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a

  • 0

I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a DB server connection loss by pulling the network cable to my desk Computer and then plugging it back. However, this causes the transaction to fail in executing a “rollback” as the DB connection object is lost. Is there a way that i can retrieve the lost DB connection object or enforce the application to try reconnect to the same connection after a certain timeperiod.
I am using DB2 and Websphere 6.1 as the app server. DB connection is thru a jndi lookup. Using Atomikos as the Transaction Manager.

In general, how does an application implementing 2-phase commit recover(rollback) in the scenario of a DB crash? Is the recovery the application’s responsibility or should the Transaction Manager do that?

  • 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-31T20:55:03+00:00Added an answer on May 31, 2026 at 8:55 pm

    I don’t think that your problem has anything to do with recovery because it likely occurs before the 2 phase transaction is prepared.

    If you simulate a failure by unplugging the network cable, then the app server will quickly notice that the connection is broken, namely when the application attempts to execute another database operation. However, on the DB2 side, the connection simply looks idle, and it may take a long time for DB2 or the host system where DB2 runs to notice that the connection is broken. The rollback will only occur once the connection has been identified as broken. In the meantime you may have issues because of the locks held by the connection.

    If you want to reduce the time it takes before DB2 initiates rollback on the connection, then you may want to tune the TCP keep-alive setting on the server.

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

Sidebar

Related Questions

I'm in the phase of implementing the server-to-server communication part of a XMPP Server.
implementing publishActivity in PHP using the REST API using this code: $activity = array(
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written
I'm going to be implementing a Web app using Rails with MySQL running on
I'm implementing FFT pitch detection on the iPhone using Apple's Accelerate framework as discussed
I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap
I'm implementing a strategy to connect to an OAuth provider implemented using oauth-plugin. In
Iam implementing facebook and twitter using sharekit for an iphone app. How can we
When implementing a client/server solutions, one of the questions you always need to answer
Im implementing a combined tab bar and navigation programatically, using the apple documentation ,

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.