WAS v8.5 > Develop applications > Develop TransactionsDevelop components to use transactions
These topics provide information about developing WebSphere application components to use transactions 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.
Use the following tasks to develop WebSphere application components that use transactions:
- Configure transactional deployment attributes. This task determines whether EJB components use container- or bean-managed transactions by setting an appropriate value on the Transaction type deployment attribute. We can also configure other transactional deployment descriptor attributes.
- Use component-managed transactions. If we want a session bean, web component, or application client component to manage its own transactions, you must write the code that explicitly demarcates the boundaries of a transaction. There are some limitations to the transaction support available to application client components, as described in the topic about client support for transactions.
Subtopics
- Configure transactional deployment attributes
We can configure the transactional deployment descriptor attributes associated with an EJB or web module, to enable an enterprise application to use transactions.- Use component-managed transactions
We can enable a session bean, servlet, or application client component to use component-managed transactions, to manage its own transactions directly instead of letting the container manage the transactions.- Use one-phase and two-phase commit resources in the same transaction
Use these topics to help coordinate the use of a single one-phase commit capable resource with any number of two-phase commit capable resources in the same global transaction.
Related concepts:
Transaction support in WAS
Client support for transactions
Related
Use the transaction service