I have an upcoming project in a class that will allow me to work with either EJBs or Spring, and I was wondering what would be more applicable for ‘real world’ situations.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The two technologies aren’t mutually exclusive. And when you say EJBs it depends on if you’re talking about session beans or entity beans (or message driven beans for completeness).
Stateless session beans are and always have been quite useful if for no other reason than they provide a reasonably consistent and low barrier-to-entry to distributed transactions.
EJB3 also takes a leaf out of Spring’s book with some dependency injection features.
That being said, this has been a long-running cause of dispute.
It’s probably worth reading some of the (many) comparisons on the Web such as this one.
It’s really hard to recommend one over the other without knowing your requirements. Personally I favour Spring though unless I’ve got a good reason not to.