J2EE Activity Service for Extended Transactions
by: Benoy Jose
Introduction:
Today’s businesses are getting increasingly complex and
sophisticated and their demands are increasing in a proportional
manner. The solutions of the present day and the systems used to
support them also need to improve to cater to the growing
demand. Transactional systems have made great improvements from
the non-interactive flat files to dynamic databases that can do
real time processing. Still as the industry expands they demand
transactional qualities that can be foolproof, persistent and
atomic. Added to these requirements which are supported by most
database systems, the need to span the scope of the transaction
for a longer period of time. This might sound easy if we are
working with a single non-dependent database. But the problem
compounds when businesses need to do transactions spanning
disparate systems across multiple businesses. Businesses would
love to integrate with other businesses and reduce costs and
improve efficiency but they would not want to do so at the
expense of locking and slowing down their own systems. There
lies the challenge to create transactional systems that don’t
lock resources down while they satisfy the need of the
businesses to interact with each other.
JTS (Java transaction Service), JTA (Java transaction API)
already exists in the industry to take care of the independent
transactions. They provide all the flexibility and robustness
required by smaller transactions that are tightly coupled to a
particular system. There is no high level API or a common
specification which caters to providing loosely coupled,
isolated transactions like the cruise scenario described above.
The J2EE activity service provides a framework to address the
shortcomings of the traditional transaction systems.
The J2EE Activity service provides a middleware framework to
support the implementation of extended transaction models. It is
a generic framework which allows different extended transaction
models to be built on top of it. The J2EE Activity service
provides an extended unit of work (UOW) that either groups a
related set of tasks with no transactional attributes or groups
them into a number of short duration transactions. The advantage
of grouping tasks into short lived transactions within a longer
activity is that the transaction as a whole does not lock up the
other resources, used by individual sub transactions, and slow
down the system. A typical problem with extended UOW models is
that the failure scenarios may be quite complex, potentially
involving the compensation of some or all of the smaller
transactions that were committed before a long-running activity
failed. The responsibility for providing the appropriate
recovery from such a failure may be shared between the
application itself, which is the component that understands what
needs to be compensated, and the extended unit of work service
provider, which might provide facilities to register
compensating actions.
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.