The entity beans have proved to be useful in describing the business logic of a persistent object. However, there are issues with them that make them difficult to use:
1. While beans are good to create/modify/remove objects, it is usually hard to implement all the finder methods i need. For example, how do I write a finder method that returns 50 records, starting with a record #100, out of some 100000 records in my database? Or how do I 'GROUP BY' my records? I know it is possible to implement this through direct JDBC calls, but I would prefer using either JDBC or EJB, not both. Does anybody have a solution to this?
2. EJBs are good before I need to add new functionality to them, therefore changing their interfaces. When I change the EJB's interface, while my clients remain with old ones, they start throwing ClassCastExceptions. How do I handle this situation?