• Post Reply Bookmark Topic Watch Topic
  • New Topic

to use ejb or to use servlets

 
saahil sinha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Why i asked tht questions regarding ejb v/s servlets is because i have this one project where i have a transaction table where user payments are taken and 2 tables r updated.The no. of transactions basically depend on user payments in a day.It can be from 10-30 in a day.And data can be entered into the system by multiple users so wanted to know if its better to implement it using EJB or servlets.Also a user can view his transactions while the client is making updations to his account as someone has payed up the borrowed money from user
Also i have 3 entities in my system for which i enter data into a database system,one can edit,delete and view the info.A person can be viewing info while other may edit it.So is it better to use CMP ejb or just servlets.
 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either will be fine.
For your servlet approach, I think you may have to delegate the database interactions to data access objects. Take a bit care there since you need to make sure your transaction (which envolves three tables in one database) either commited or rolled back.
For your EJB approach. CMP Entity Beans are fine. But you may want to consider adding a facade seeion been in front of them and set your transaction demarcation and isolation level at the session bean level.
Should be a smooth ride...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!