How can i achieve ACID properties i.e related to a transaction in Java.
I wannt to transfer amt from A's Acct to B's acct. Now say, 100 bucks are debitted from A's Acct, but then some exception happens, and therefor B's acct is not credited with the same. Could anyone please tell me how can i handle this scenario in Java
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
You will need a transaction manager that will manage the two-phase commit between the two databases.
Java EE application servers have such transaction managers built it, so if you are doing this within a web application (or actually, within an EJB) you should be OK - but check the app server's documentation for transaction handling