• Post Reply Bookmark Topic Watch Topic
  • New Topic

An inquiry on EJBs transactions and load balancing

 
alrem mashayekhi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I've been a software developer for three years now this is the first time I would work on EJBs. I already know how to use them but I really don't have a complete grasps on reasons for using it. I have some questions

They said if your application requires transactional use cases, you need to use EJBs. Why can't you use a transaction on it's own without using EJBs? What if I don't need to distribute my business logic, I just have transactional requirements in my app, is using an ejb really necessary? If you explicitly mark transaction boundaries in a BMT Session bean anyway, why not just use the transaction object without the ejb?

One other reasons for using EJB is load distribution for scalability requirements. Using load balancers can handle scalability right? so why still use ejbs then?

 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
If you do not want to use EJB, you can use Spring's declarative transaction management capabilities as well. You can also use plain JDBC based transaction handling too. However you will need to write some code for doing that. With declarative approach it is easier to demarcate the transaction boundaries in an application.

regards,
Amit
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!