|
|
|
Transaction
Processing: Site Autonomy
|
|
|
|
|
|
Describing the web
service, we have noticed that it is stateless. In case of DML operations,
this means that each request determines completed transaction, and the web service finishes its processing by
commit or rollback depending on result of DML command in database.
|
|
|
|
Such behavior
conforms to SOA principles of “autonomy” and “loose coupling” which declare
service relationship with minimum dependencies and full service control over
the encapsulated logic.
|
|
|
|
We've seen before
that MyEntityImpl class which invokes DML requests to WSDS, overrides lock()
method in super class. It's done to ignore row-lock request to database when
client application makes first change in the row. As result, no transaction
is started in database. Otherwise, web service should support transaction (or
session) states between client requests.
|
|
|
|
ADF Swing framework
provides client-side transaction status in the data binding objects.
Transaction state methods are used for managing visual states of UI
data-bound components. For example, buttons of JUNavigationBar object which
control commit, rollback, insert and delete operations become enabled or
disabled depending on current transaction state.
|
|
|
|
Client application
invokes commit action by calling postChanges() method in MyEntityImpl object.
For rollback action, the rowset can be simply refreshed from the database. In
both cases, current transaction state should be changed to “off” by
appropriate call to ADF bindings framework.
|