a virtual component or a wrapper in the business component tier accesses several different databases (in the eis tier) within a single transaction. several virtual components are included within a transaction and access several different databases within a single transaction (see figure 1). a virtual component calls different eis systems within a transaction. several virtual components deployed in different containers call different eis systems within a transaction (see figure 2). a combination of the above - several virtual components may call a combination of eis systems and access several different databases within a single transaction.
for each scenario its necessary to figure out how transactions can be propagated from the j2ee to the existing systems and back. things get more complicated because some of the existing databases and applications may already provide transactional support.
local and distributed transactions 【推荐阅读:An Introduction To W】
last months article "j2ee as the platform for eai" (jdj, vol. 7 issue 3) discussed the suitability of the j2ee platform for eai (enterprise application integration). this article addresses more advanced integration topics, particularly transaction and security, support for web services, and an overview of j2ee application servers.
eai enables concurrent access to data and functionality shared between disparate existing applications while maintaining integrity, consistency, performance, and recoverability. transactions play an important role in ensuring integrity, consistency, and recoverability.
support for transactions
in general, a transaction includes several resources (such as components, databases, and existing systems). each resource taking part in a transaction needs a resource manager, which manages access to one or more resources. the whole transaction, however, is managed by the transaction manager. figure 3 illustrates these relationships.
the transaction manager coordinates different resource managers. therefore, it has to establish and maintain the state of the transaction. this state is managed by the transactional context, which associates the transactional operations on the resources. all resources that participate in a transaction share the same transactional context. usually the transaction manager also takes care of propagating the transactional context between the resource managers. resource managers, however, have to notify the transaction manager about their participation and the current state of the transaction. based on this information, the transaction manager decides whether to commit or roll back t... 下一页