• 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

Usefulness of EJB

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I keep reding article after article,which indicate that EJB uses lot of resources,and after all it is not such a great technology.We can do without it.Any opinions?
vishal
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've heard it said that EJBs and maybe even regular JavaBeans were Sun's attempt to be a Java form of ActiveX. However, they are useful in their own right, as they componentise logic. That's very important in software engineering, where the often-sought/seldom-realized goal is to have plug-in, well-documented, well-defined, pre-debugged technology.
EJBs can be a lot of overhead, especially when used unintelligently. However with a large complex system where processing may be distributed and transaction intergrity may be critical, they begin to prove their worth, since these high-overhead features are presupplied with EJBs - there's no need to invent and debug your own.
You can, and often should, avoid EJBs for small projects or special performance situations where nothing but a custom solution will do, but there is definitely a place in the toolbox for them.
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBs offer enterprise services, in simple terms, if you need these services then EJB (particularly CMP) is an almost trivial way of getting transactioning etc.
Using EJB is also a goos way to enforce (well, it helps push you in the right direction) sensible encapsulation.
If you do everthing with prepared statements etc it is very easy to have a highly coupled system, EJB encourages you to encapsulate.
In that sense EJB is a winner, although design patterns such as Data Access Objects give you the same thing.
 
Author
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJBs are currently the most advanced technology for building middle tier business logic components. Never before was it so easy to develop portable reusable components that provided transactional support, security, persistence management and resource management. Even better, EJB provides these services in a declarative way, meaning that we do not have to write code to use them.
EJB is also the only component architecture that supports components with state. Combining state and behavior is namely the primary OO directive.
EJB is targeted to enterprise information systems. With support for all this functionality it definitely requires resources, but this doesn't make it a bad technology. BTW, a powerful engine also needs more fuel to operate.
Cheers,
Matjaz

------------------
Matjaz Juric
Author of Professional EJB
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic