-
1. Re: Should I do hierarchical EJB3s?
pomeloverde Oct 15, 2005 8:15 AM (in response to platinumdragon)Well, I think that first you should define a more robust Application Architecture. Using well proved design patterns is mandatory in order to create quality software.
You should design a well defined Data Model. It will modeled with Entity EJB3 beans, that as POJOs, can be used as Data Transfer Objects too. The Entity beans can have relationships. For example, a Doctor could have a OneToMany relationship with Patient.
In addition, you should be design a Business Logic layer, implemented with EJB3 Session Beans. The same Session Bean can implement a Remote interface and a Local interface.
You can user the POJOs (annotated as Entity Beans) as parameters and returns values in the business methods implemented by the session beans.
And remember... dont mix business logic within data model objects.
I recommend you the "J2EE Architetc's Handbook" that you can download for free from www.theserverside.com.
Enjoy EJB3!