• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

EJB - Component Model???

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently heard some describe EJBs as a component model. When I looked up the term component model I couldn't seem to find a definition.

Could anyone please explain to me what a component model is?

Thank you!!
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Head First EJB book gives a good explanation, but if you don't have access to that book just think of code you can use and adapt at deploy time, i.e. without source code changes.

The adaptation could be through a deployment descriptor (the EJB approach), JavaBean properties (the AWT/Swing approach), injection (the Swing approach), or aspects (the AspectJ approach), maybe others that I'm missing... but the idea is that it is a hunk of compiled code with a well-defined set of services that you can use without the source but still adapt effectively to your needs.

EJB adds a bunch of other meat to the concept to support distributed components that make extensive use of container-managed services.
 
ravinderSingh singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. I've searched the web and it's difficult to find a standard definition.

Just to clarify, any ejb I develop is a component since aspects of its behaviour can be configured at run-time using xml attributes?
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, specifically a distributed component. How good a component depends upon you, obviously. If you could imagine deploying the component twice with different bits of configuration and have two useful things for your app, you know you are heading in the right direction.

Doesn't mean that you always need to deploy EJBs multiple times, but if you find you *never* do multiple deployments of any EJB, it suggests you might not be getting all of the EJB benefit that you could - either meaning more learning is needed, or maybe you weren't dealing with a very EJB-ish problem in the first place.
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic