• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

An inquiry on EJBs transactions and load balancing

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic