• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

USing Servlets , SessionBeans JPA for Data Persistence

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Please tell me what will be the right approach for doing CRUD operations .


I have a jsp page with which the user interacts.

Please tell me the right approach here :


Option 1 :
JSP --->Servlet--->SessionBean--->JPA.

JSP Page submits data to the servlet , the servlet looks up for the SessionBean , and the sessionBean consists of the container EntityManager , for persist , delete , and finding .

Option 2 :

JSP --->Servlet-->JPA.

The Jsp page submits to servlets and the Servlet itself consists of the container EntityManager , for persist , delete , and finding .

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is whichever better suits your requirements. Does your application need session beans?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic