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.

  1. The setTransactional (true) method is called on the JoltServiceBean. (isTransactional is a Boolean property of the JoltServiceBean.)
  2. The beginTransaction() method is called on the JoltSessionBean.
  3. The callService() method is called on the JoltServiceBean.
  4. Depending on the outcome of the service call, the commitTransaction() or rollbackTransaction() method is called on the JoltSessionBean.