Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlets or Stateless Session EJB to update database?

 
Cas Sater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking into writing an app that would update a database through JDBC. Was curious if this could be safely implemented with servlets rather than the additional cost and development time using EJB. Can somebody comment?
Thanks.
 
Ashwin Tadepalli
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You could no doubt implement that with servlets and it is safe.
You can do all sorts of operations like inserts,updates,deletes in the database safely.
Ashwin
 
Cas Sater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you...
Follow up then...(Maybe this is getting into EJB territory)
At what point or in what situation does straight Servlet coding become too unwieldy and better handled by EJB application servers?
Are there any resources that address the issues related to multiple users updating a database? I guess that transactions would handle this kind of thing, but I'd be interested to hear more.
Thanks again.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!