5 Issues and problems affecting internet, e-commerce and e-business development

5.6 Problems with transactions

A distributed transaction is a sequence of operations applied to a number of distributed databases which form a single functional step. For example, a transaction which moves an amount of money from a customer's account to an account owned by the same customer is an example of a transaction. It consists of two operations: the operation of debiting one account and the operation of crediting another account. There are a number of problems associated with distributed transactions. This section will briefly concentrate on one. This is the problem of deadlock: the fact that a transaction applied at one server might be waiting for data which is currently contained on another server, with the other server awaiting some resource that is held on the first server. For example, the first server might contain the account data that the second server needs to complete a transaction, while the second server might require other account data for it to proceed. Enterprise JavaBeans removes from the programmer the need to worry about many of the problems detailed above. Enterprise JavaBeans is a distributed component technology which allows developers to develop reusable components which can be used in transactions.