File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes 2 phase commit (commit phase timeout) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "2 phase commit (commit phase timeout)" Watch "2 phase commit (commit phase timeout)" New topic

2 phase commit (commit phase timeout)

Ikram Shahzad

Joined: Aug 04, 2008
Posts: 12
i am using weblogic 8.1 and having 3 application server (Branch A,Branch B,Head Office) and these server are running independently and having there own database D-A, D-B, D-C

Step 1: Branch A request the Information for customer from Branch B and send this request To Head Office
Step 2: Head Office have the information to connect with Branch B and using this information it Connect to Branch B ans request for customer information
Step 3: Branch B gets the customer information and send it back to Head Office
Step 4: Head Office Send customer information Back to Branch A
Step 5: Then Branch A receive the information and Display The customer information Information to User

now this scenario work perfectly on LAN Environment but when i communicate these server with each other through cloud. At Step 5 The Branch A receive the information and hang out.

i think at the 2-phase of 2-phase commit protocol its hangout... and the time out message comes

please can can any one help me out.... why it hanging and not displaying the the customer information
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

Firstly EaseUp.

Why do you think it is hanging during commit? Do you have any logs that tells you that way?
What is the transaction timeout that you have set for the transaction?
Can it be so that there is a lot of network latency and because of that the process is just taking time and there is nothing wrong? If that is the case, then probably you can either increase the timeout period or debug the reason for the latency.

apigee, a better way to API!
Ikram Shahzad

Joined: Aug 04, 2008
Posts: 12
The reason in think is that the co-ordinates involves in this transaction are unreachable by second phase....

I am using two different ISP connection for each branch and There is difference in the latency rates....

The timeout by default is set to 30sec. i increase it to even 6 minutes but still transaction time out error occurs.

Q: if there is latency issue how can i resolve it?

second issue is that when ever i change IP of any server and request for customer balance ..... its shows me the message server in the co-ordinates not found and displaying the information of old IP in it.....

i restart all the servers but still same issue....

then i delete the *.tlog in application server of each branch and head office its works fine...

Q: so whenever i have to change the IP of a server i have to delete *.tlog files to?

I agree. Here's the link:
subject: 2 phase commit (commit phase timeout)
It's not a secret anymore!