Quick scan of EJB3.0 Early draft
The following was posted by Santosh K Panda on July 05, 2004 @ 10:01 AM in response to Message #128078 1 replies in this thread :
Thought of sharing with you all ...
" I took glimpse of the EJB3.0 specification. I always disliked EJB because it had got its own
1) Complex learning curve.
2) OOP-killer,can't use much of OOP in EJB's.
3) Confusion about Local or remote confusions.Then having both local and remote interface duplicating code.
4) Half baked query in deployment descriptor,persistence suuport with CMP.
5) Write wrapper in the framework so that the non-EJB component can be reused in a App server environment.
6) Reinventing the old java application completely just to make them EJB-compliant.
Recently after using JDO,I became die hard fan of its persistence mechanism.Simple POJO(plain old java objects) doing persistence so well that in EJB,it took lot complexity to achieve.
With JDO,you can break the complete subsystem into granular POJO and can move them from web to data tier and persist them,so easy life :).With EJB3.0,you will find some similarties,if you are coming from JDO/Hibernate world.
In brief about EJB3.0 ...
1) No need of Home interface :) (No need ).
Just say new() ,you get an "instance"
2) No more confusions to make an EJB remote or local,it's the client which would decide and cast to appropriate.
3) Just write SINGLE simple Java class and annotate it to be Stateless/Stateful/Entity/MessageDriven.Container would generate or take care rest of the complexity on your behalf.
4) Use "annotation" and your POJO is ready to be used as an EJB. (Life is so simple,after coming back from complexity)
5) Any POJI(Plain Old Java Interface) can be your EJB interface,just use "annotation".
6) Entity Bean are now any POJO entity ready to persit in data store(it has to be a JavaBeans type). Use OOPs ...inheritence,association,everything is possible with Entity bean now.
7) Forget all EJB life cycles.For example Entity bean life cycle in 3.0 is new,managed,detached,removed.
8) Heard of dependecy injection in Spring,HIvernate,HiveMind ? They are great and they are the way for Enterprise application. Now it's part of EJB3.0
9) Ready to develop complex query,inner/outer join with EJB3.0.
10) Lastly unlearn all EJB skill and get on a fresh mind for 3.0.
Time for somebody to write a "Never Mind changing EJB" book. ;) ? "
Controlling complexity is the essence of computer programming. (Brian Kernigan) :cool:
|All times are GMT +5.5. The time now is 23:55.|