It depends on application server.
By calling setTransactionType() method of the EJBContext object
By specifying <transaction-type> tag in the deployment descriptor file.
By passing appropriate value to begin() method
By passing appropriate value to the commit() method
There is no need to specify it - EJB container automatically determines the most suitable type.
|