home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book Home Enterprise JavaBeans Search this book

8.4. Non-Transactional Beans

Beans that reside outside a transaction scope normally provide some kind of stateless service that doesn't directly manipulate data in a data store. While these types of beans may be necessary as utilities during a transaction, they do not need to meet the stringent ACID requirements of a transaction.

Consider a non-transactional stateless session bean, the QuoteBean, that provides live stock quotes. This bean may respond to a request from a transactional bean involved in a stock purchase transaction. The success or failure of the stock purchase, as a transaction, will not impact the state or operations of the QuoteBean, so it doesn't need to be part of the transaction. Beans that are involved in transactions are subjected to the isolated ACID property, which means that their services cannot be shared during the life of the transaction. Making a bean transactional is an expensive runtime activity. Declaring a bean to be non-transactional (i.e., Not Supported ) leaves it out of the transaction scope, which improves the performance and availability of that service.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru