• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why do we need EJB's at all?  RSS feed

 
Dan Resnick
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The earliest justificaion for ejb was SCALABILITY.
Today, scalability of non ejb Web applications can be
achieved by using clusters. Clusters also supply other benefits.
Transactions management: Can be achieved perfectly using jdbc/sql.
The only exception is 2 phase commit. It is rarely used and can be programmed easily and more effiently by an average programmer.
Security: EJB relies on 'roles'. This model may be sufficient for some applications but most applications need more security features (E.g limit access per user data or per a department...). In any case it can be easily programmed and the notion that one can change security without changing the code may not be realistic.
DB connectivity and read/write: I am assuming using a relational db one or another.
Performance: This is probably the weakest link in the chain. Many advocate strategies to minimize network trafic to enhance performance. Some server manufacturers (like BEA) even discourage using remote CMP entity EJB (suggesting using "local" ejb on the same server and the same application.). If one should use EJB in local processing then why not stick to regular non ejb classes/beans?
Ease of development, debug and deploy:
Imagine being called in the middle of a night to fix a production bug ASAP.
Do you think that ejb environment is helpful? The same is true during development.
Please reply and let me know what you think. Lets stick with practical real life cases (No "Objectivity is the way to..." phrases)
 
Nagendra Prasad
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan,
I am quite some way into a book by Rod Johnson. (Expert one-to-one J2EE design and development from Wrox press)... it tackles the very questions you ask... justifies them based on scenarios... and provides a very compelling discusion of each case... one step for you would be to get a copy of this from somewhere and read it... after a long time i have found a tech book which is quite unputdownable!!!
all the best.
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yo Dan,
Maybe you don't need 'em, but I know, and have consulted for, a lot of large campanies who do!
I think you got most of it (transactional, distributed, secure, concurrent, blah, blah, blah), but you left out (IMHO) a huge part of the value proposition of EJB's, so here goes.
INTEROPERABILITY
That my 25 cent word for standard components that run in standard containers. And that means you can develop in whatever compliant IDE suits yer fancy and run in any compliant application server!
So a number of us create and/or implement J2EE specs. And that seems to be working just fine for everybody with the possible exception of M$, and even Bill and the boys have figured out that Web Services rock and .NET talks the same ole SOAP as any decent Java based solution.
Now with MDBs we get asynchronous invocation, and local interfaces allow us to use the stateless session bean as a facade for the entity beans which can be deployed locally, and CMP has matured, and JCA is in, and BMP is there in yer toolkit as well.
So... you don't always use a hammer, cause everything is not necessarily a nail. So don't pay for an EJB if you don't need one. I figure you got that.
With IBM's tooling you can code, test, test, test, and run. For me it's just one big happy family, but YMMV. And I do not carry a pager, but my friends who do carry one generally get a good night's rest.
Still need "practical real life cases"? I figure you know what I think.
Now rock on dude!
[ November 02, 2003: Message edited by: Howard Kushner ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!