Using Transactions with JoltBeans
Your Oracle Tuxedo application services may have functionality that updates your database. If so, you can use transactions with JoltBeans (for example, in the sample, BANKAPP, the services TRANSFER and WITHDRAWAL update the database of BANKAPP). If your application service is read-only (such as INQUIRY), you do not need to use transactions.
The following example shows how to use transactions with JoltBeans.
- The
setTransactional
(true)
method is called on the JoltServiceBean. (isTransactional is a Boolean property of the JoltServiceBean.) - The
beginTransaction()
method is called on the JoltSessionBean. - The
callService()
method is called on the JoltServiceBean. - Depending on the outcome of the service call, the
commitTransaction()
orrollbackTransaction()
method is called on the JoltSessionBean.
Parent topic: JoltBeans Programming Tasks