How to handle Transaction in Standalone Java Programe
1 posts in topic
Flat View  Flat View

Posted By:   bala_subramani
Posted On:   Thursday, November 20, 2003 10:46 PM


Java program is running on UNIX operating system and outside the application server. This java application handles the transaction management with commit and rollback. My question is how to handle the exception of power and network failure.

How can I implement the transaction management for the above case. Should I use the java program inside the application server or can i use JTA to solve this problem.


with Regards,

Re: How to handle Transaction in Standalone Java Programe

Posted By:   Anin_Mathen  
Posted On:   Friday, January 2, 2004 11:41 AM

Power Failures and such interruptions are something which only clustered app servers can handle and tide over.

In your case a power failure would rollback the transaction automatically because you would never have issued a commit and the broken database connection will cause the database itself to abort the transaction on its part.

The advantage of using a clustered setup using app servers is that the cluster manager would detect a failed app server on one node and migrate the transaction to a mirror which would go ahead with the transaction. This clustering concept is almost a science perfected by appservers and it would be too much to try and replicate all that effort by yourself.

Hope this helps,

About | Sitemap | Contact