Difference between local and global transaction?

Showing Answers 1 - 5 of 5 Answers

Sathis Kumar

  • Jan 16th, 2006
 

A transaction is a group of statements that represents a unit of work, which must be executed as a unit.

Normal transaction is also known as Local transaction.

A global transaction is a mechanism that allows a set of programming tasks, potentially using more than one resource manager and potentially executing on multiple servers, to be treated as one logical unit.

  Was this answer useful?  Yes

ak40732

  • Mar 21st, 2006
 

A transaction is atomic unit of Work.The tasks which are made into the transaction act as a unit which can be executed successfully all,or if at least one task fails to its promise ,then the effect of all the tasks are to be rollbacked.Thus transaction is committed or rolled backed.

Transactions can be divided into two categories.

1.Local Transactions:These transactions are confined to objects which reside inside one particular JVM.Local transactions in java can be implemented using the JTA api.

2.Global Transactions:These transactions may encapsulate objects which are distributed on various JVM's.Global transactions are implemented throught TWO-PHASE-COMMIT design implementation.

The primary difference is that local transaction are single JVM level while global transaction are at multiple JVM level and hence global transactions need different design approach [which can be classified as declarative transaction management & programmatic transaction management]

A global transaction is a mechanism that allows a set of programming tasks, potentially using more than one resource manager and potentially executing on multiple servers, to be treated as one logical unit.

A global transaction may be composed of several local transactions, each accessing the same resource manager. The resource manager is responsible for performing concurrency control and atomicity of updates.

Thanks,
Vinay

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions