The Transactions tab configures the component’s transactional properties. Chapter 5, “Understanding Transactions and Component Lifecycles,” provides useful background for the transactional properties.
The transaction attribute determines how methods in your component participate in transactions; the setting affects all methods.
The transaction attribute can have the following values:
Not Supported (The component-level default) The component’s methods never execute as part of a transaction. If the component is activated by another component that is executing within a transaction, the new instance’s work is performed outside of the existing transaction.
Supports The component can execute in the context of an EJB Server transaction, but a connection is not required in order to execute the component’s methods. If the component is instantiated directly by a base client, EJB Server does not begin a transaction. If component A is instantiated by component B, and component B is executing within a transaction, component A executes in the same transaction.
Required The component always executes in a transaction. When the component is instantiated directly by a base client, a new transaction begins. If component A is activated by component B, and B is executing within a transaction, then A executes within the same transaction; if B is not executing in a transaction, then A executes in a new transaction.
Requires New Whenever the component is instantiated, a new transaction begins. If component A is activated by component B, and B is executing within a transaction, then A begins a new transaction that is unaffected by the outcome of B’s transaction; if B is not executing in a transaction, then A executes in a new transaction.
Mandatory Methods may only be invoked by a client that has an outstanding transaction.
Bean Managed For EJB session Bean components only. The component can explicitly begin, commit, and rollback new, independent transactions by using the javax.transaction.UserTransaction interface. Transactions begun by the component execute independently of the client’s transaction. If the component has not begun a transaction, the component’s database work is performed independently of any EJB Server transaction.
Stateless session Beans can use this attribute, but transactions begun in a method must be committed or rolled back before that method returns. Otherwise, EJB Server logs an error and returns an exception to the client. Stateful session Beans can create transactions that remain open across several method calls.
Never The component’s methods never execute as part of a transaction, and the component may cannot be called in the context of a transaction. If a client or another component calls the component with an outstanding transaction, EJB Server throws an exception.