Today we'll develop an EJB with BMT through an example adapted from our university registration system. We'll also demonstrate the use of servlets as controllers in the Web tier, and use a JavaBean object to transfer data between the EJB tier and the Web tier.
The following are the main steps required in developing an EJB component with BMT:
In the EJB's deployment descriptor, the bean developer sets the transaction type in the <transaction-type> tag to the value Bean to specify a bean-managed demarcation.
The client application uses JNDI to obtain an object reference to the UserTransaction object to establish a transaction context.
The client application begins a transaction using the begin() method of the ...