Develop components to use transactions

These topics provide information about developing WebSphere application components to use transactions

 

Overview

The way that applications use transactions depends on the type of application component, as follows:

  • A session bean can either use container-managed transactions (where the bean delegates management of transactions to the container) or bean-managed transactions (component-managed transactions where the bean manages transactions itself).

  • Entity beans use container-managed transactions.

  • Web components (servlets) and application client components use component-managed transactions.

You configure whether EJB components use container- or bean-managed transactions by setting an appropriate value on the Transaction type deployment attribute, as described in Configuring transactional deployment attributes. We can also configure other transactional deployment descriptor attributes.

If you want a session bean to manage its own transactions, write the code that explicitly demarcates the boundaries of a transaction as described in Using component-managed transactions.

If you want a Web component to use transactions, write the code that explicitly demarcates the boundaries of a transaction as described in Using component-managed transactions.

Similarly, if you want an application client component to use transactions, write the code that explicitly demarcates the boundaries of a transaction as described in Using component-managed transactions. There are some limitations to the transaction support available to application client components, as described in Client support for transactions.

 

See also


Configuring transactional deployment attributes
Using component-managed transactions

 

See Also


Transaction support in WAS

 

See Also


UserTransaction interface - methods available