• Post Reply Bookmark Topic Watch Topic
  • New Topic

Should I use EJB here ?  RSS feed

 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our newly developing web application, its being undertood that about 150,000 database transactions[mostly insert,update] can occur in ONE DAY.

So far, I was thinking about using JSP,Action Classes and DAOs with embedded SQL statements. But when I heard this huge volume I am thinking about EJB.

Should I ?

Please let me know,

Atul
 
Andr� Salvati
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, EJB is a good option... with EJBs your application server abstracts security, transaction and persistence services.
 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To determine if EJB is appropriate you need to answer the following questions.

Security - Do you have or need the J2EE role authentication authorization. At Kaiser many of our applications did not care who put what in it just entered it into the data base. So we did not we did not need security. Everyone was allowed to enter or view every thing. There for we did not need J2EE security.

Transaction control - Are your transactations complex with mandatory roll back. your DB is taking 1 sql transaction about every .6 seconds, IMO that is light traffic. If your transactions are simple insert, select, update, delete to a single database then you do not need transactional control.


If you do not need security and transactions you do not need EJBs or the expense of running them. Have your JSP's directly access a DAO.

If you need either security or transactions you may need EJB. Your current and future situation has to be analyzed.There are work arounds that may allow you to get away without EJB's.

If you need both security and transactions then you need EJB.
[ July 07, 2006: Message edited by: peter cooke ]
 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

Thanks for the response.

For your questions:

1. Our application have to be based on various user roles. There are three different levels of users who can access the application. Of which the three level users can do inserts/updates.

2. Transaction question:

Transaction control - Are your transactations complex with mandatory roll back. your DB is taking 1 sql transaction about every .6 seconds, IMO that is light traffic. If your transactions are simple insert, select, update, delete to a single database then you do not need transactional control.


We have numerous selects,inserts,updates.
They are to a single database right now but in the future we have to consider mirroring too. But there are conditions when one insert call/update call interacts with multiple tables.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!