Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does WebSphere sMash support transactions?

0
Posted

Does WebSphere sMash support transactions?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123