When to use POJO and When to use SLSB

Posted by user83795 on Stack Overflow See other posts from Stack Overflow or by user83795
Published on 2009-03-27T21:00:50Z Indexed on 2010/05/01 3:07 UTC
Read the original article Hit count: 299

Filed under:
|

we are using EJB3 in our application. Our design aim is to separate persistence layer from Business Layer. So we have developed XXXbean classes to be used as SLSB and XXXRepository classes to be used as persistence classes. We also have POJO that implement reusable NON business logic(get list of countries etc) and we call then service/helper Classes.

We use EJB3 JPA (using Hibernate provider) and Repository classes has all the methods for CRUD operation and the get methods for data access. Currently XXXRepository classes are all POJO and we instantiate these classes directly from the bean XXXClasses or from the service Objects.

Should the XXXRepository classes be SLSB ? what would be the benefits and pitfalls of converting them to SLSB?

© Stack Overflow or respective owner

Related posts about ejb3

Related posts about pojo