O'Reilly logo

Sams Teach Yourself EJB in 21 Days by Krishna Kothapalli, Ragae Ghaly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing an EJB with BMT

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:

1.
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.
2.
The client application uses JNDI to obtain an object reference to the UserTransaction object to establish a transaction context.
3.
The client application begins a transaction using the begin() method of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required