how to make choice between spring framework and EJB3 [duplicate]
Possible Duplicate:
JEE6 vs. Spring 3 stack
Let I’m going to develop a mission critical application which will be massively transaction based. I will do it with Java. Now I have to choose the technology. My application must be scalable, good performing, code must be maintainable and I want to get long term ROI. First thing, I’m going to choose framework. As a framework, spring comes at first in my mind. But I know there are more like EJB3 or anything. Now my question, what should I choice, EJB3 with JPA or spring framework with Hibernate. I know every technology have tradeoffs. Can anyone help me to make good choice? And one thing to make clear, I’m still learner.And I want to know advantage and disadvantage of EJB and spring framework too. Thanks
And I want to know advantage and disadvantage of EJB and spring framework too
Both are light and POJO based, and you could get a good picture from similar threads. You might find that many of the pain-points that existed with EJB 2.x are no longer there.
'EJB' might simplify things for you
- If your application would need distributed transactions started by remote clients
- If your application is message-driven
Now my question, what should I choice, EJB3 with JPA or spring framework with Hibernate.
Also look at adding CDI to the stack ( i.e EJB3.x + JPA + CDI ) and then compare with (Spring + Hibernate)
精彩评论