Does WebSphere sMash support transactions?
WebSphere sMash does not support JTA transaction through the use of Transaction Managers or Resource Managers. However, local, single-database transactions are supported. No more functionality beyond JDBC is offered. However, there are conventions and convenience methods that simplify the application code. The following example illustrates how to execute a group of database operations in one transaction: def data = zero.data.groovy.Manager.create(‘personDb’) data.inTransaction{ data.update(…) data.update(…) data.queryList(…) } If an exception occurs, the group of statements is rolled back. If the closure successfully runs, the group is committed. You might want more granular control over the group of statements in some situations. The following explicit example is a model of how this is done: def data = zero.data.groovy.Manager.create(‘personDb’) data.startTransaction() try { data.update(…) data.update(…) data.queryList(…) data.commitTransaction() } catch (Throwable e) { da