In my point of view,this structure is not so good. In your pattern, you don't benifit a lot from EJB3 and JSF. It's just the same like using struts1, spring, hibernate.
The main reasons are as following:
1) “显示对象”(Is it like actionForm in Struts1?), VO and PO are not needed any more,and use POJOs(+Annotation) as EJB3 entity Bean,which could also be used as VO,and be passed to web layer.In JSF "managed beans" and JSPs( or xhtml),use these beans as JSf compoment value binding objects.
In some cases, we need add some wrapper classes which may wrap several POJOs(EJB3 entity beans) for conmunication between web layer and business logic layer.
2) In EJB3 Session Bean,"EntityManger" is used for data handling. You will soon find out that DAO layer seems unnecessary. Consider no DAO layer first,add it when absolutely needed in case very complex business logic.
In my previous project using JSF+EJB,put it simply,the pattern is "Facelets--> .xhtml--> managedBean-->EJB Session Bean--> EJB3 Entity Bean -> database".
we use POJOs(+some wrapper classes) 1)for page component binding(in jsp or .xhtml); 2)for data transfer(as VO)between layers;and 3)for data persistence(as PO). This dramatically reduces the code for data conversion.
In my point of view,this structure is not so good. In your pattern, you don't benifit a lot from EJB3 and JSF. It's just the same like using struts1, spring, hibernate.
The main reasons are as following:
1) “显示对象”(Is it like actionForm in Struts1?), VO and PO are not needed any more,and use POJOs(+Annotation) as EJB3 entity Bean,which could also be used as VO,and be passed to web layer.In JSF "managed beans" and JSPs( or xhtml),use these beans as JSf compoment value binding objects.
In some cases, we need add some wrapper classes which may wrap several POJOs(EJB3 entity beans) for conmunication between web layer and business logic layer.
2) In EJB3 Session Bean,"EntityManger" is used for data handling. You will soon find out that DAO layer seems unnecessary. Consider no DAO layer first,add it when absolutely needed in case very complex business l