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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.