Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

spring & ejb3

  Asked By: Jeff    Date: May 02    Category: Java    Views: 1732
  

i have a question:
is spring framework better than EJB3.0 in practice?
i read many document, but i want to know is there
anyone who work with this and find spring better??

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Christie Bradley     Answered On: May 02

I have some comments:
- EJB 3.0 is a specification so depending on which EJB container you use you may get diffrent results(performance for example)
- EJB 3.0 is at its start, but Spring is a proven framework  for enterprise applications
- EJB is a component specification for both business and persistence layers, Spring is a framework for all layers(It doesn't suggest you what type of component you use for persistency for exp.).
- The old problem of EJB is that you need to stick to a container that you need to start & stop it during the development time.
- You can use EJB 3.0 with Spring, There is no conflict!

I suggets you to use Spring, and then look if you need EJB or not(Would EJB bring you some thing that Spring can't support? Do you realy need to implement standard components?(Anyway I think Spring is a defacto standard now)).
You need to consider your application server too. How is the quality of your App. server? Does it for example support hot deployment? How scalable is it?
I hope these comments help you, As I said there is no conflict between EJB 3.0 and Spring. There are some concepts that are both in java EE 5.0 and Spring like dependency injection. Maybe more correct to compare java EE 5.0 with Spring!

Consider what are your technical requirements and then check which solutions are better for you.

 
Answer #2    Answered By: Wendy Harrison     Answered On: May 02

this question  can start a war!
in short
Spring can be used with EJB3.0
Spring and EJB 3.0 are targeted for different need but some features of each framework  can be found in another.
if what ever you want can be found in EJB3.0 then it may be wise to use EJB3.0, because it is an standard with different implementation but spring  is a framework.
you may need rest of features of Spring which are not found in EJB3.0 then you may use spring.
so to give a good decision you must first clear what is your need? do you need a dependency injection container? do you need a integration mechanism? do you need a server side component model? ...

 
Answer #3    Answered By: Noah Evans     Answered On: May 02

Maybe you can compare Hibernate and EJB3. EJB3 is very strong and reliable for enterprise systems. In small scale you will lose performance. In EJB2 we had a problem for using entity bean and the problem was complexity of it. They solved this problem for entity bean and Hibernate was their model for it. For small businesses the EJB container can be a problem. Some web servers don’t have any EJB container.
The best pattern for practicing in small businesses according my experiences is JSF and Hibernate. In this case you don’t need any kind of special container and you can have an out of box solution.

 
Answer #4    Answered By: Candace Foster     Answered On: May 02

1) Comparision Spring Vs EJB

2) Enterprise MiddleService solution ..

EJB as solution..
Spring as solution..

3) What do we want from perfect ideal enterprise middle service ?

4) Can EJB to achieving promise's ?

5) Complexities Development

 
Didn't find what you were looking for? Find more on spring & ejb3 Or get search suggestion and latest updates.




Tagged: