11.6. JDO integration with stateless session beans

Although entity beans were originally designed to encapsulate data access, it is far more common for session beans to manipulate data directly without doing so through entity beans.

Session beans may be either stateless or stateful, and employ CMT or BMT. For stateless beans, BMTs hold no benefit unless it is a requirement that a single method invoked on the session bean invokes several serial transactions. Therefore the stateless session bean example will use CMTs. The bean implementation will not programmatically demarcate transactions, and the persistence manager will be obtained after the J2EE transaction has started. Since the application server’s container will commence transactions before ...

Get Java™ Data Objects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.