I think there is a confusion about doing the business logic in an EJB and doing it in the EJB container.
An EJB is likely to instanciate ordinary
Java classes to handle business logic. Nonetheless, these ordinary Java objects are still executed in the EJB container and in the context of the EJB that instanciated them. Therefore they benefit from all services of the EJB container according to the configuration of the EJB (transactions, security...).
The reasons are:
- to avoid having super-sized EJBs
- to ensure decoupling and cohesion of different business logics, that might be initiated from a same EJB (such as a Facade as mentioned before).
Bruno Collet<br /><a href="http://www.practicalsoftwarearchitect.com" target="_blank" rel="nofollow">www.practicalsoftwarearchitect.com</a><br />- The Paradox of Software Architecture: It is easy to make a complex architecture, but it is difficult to make a simple architecture.