Separating Entity/POJO layer from Session bean Layer


EJB design: Separating Entity/POJO layer from Session bean Layer

  1. Is it possible to create an enterprise architecture that would support all my business interfaces and entities/pojo into one solution and all my session beans in another? The reason for the questions is I would like an architecture that would support swapping the session layer of ejb3 entity manager persistence with manual JDBC or some other new persistence technology at some point. The problem I’m currently having with this view is actually implementing it with a JSF managed bean front end using a @Local interface. Any suggestions or opinions?
  2. Well, I don't know much about JSF and its managed beans, but for this solution a Facade is used, means that you don't expose your DataModel but you expose your business logic, and this business logic is hiding how it gets the data for you, whether using JDBC, EJB3.0 JPA or whatever you like.