We are currently debating on whether to use EJB3 or Spring in our application. From what I see Spring has an edge in that it provides a light weight framework which has the following advantages
1) Allows to make any POJO transaction-aware using AOP.
2) Persistence : Provides support to different ORM's. Also wraps JDBC API to make it more usable and eliminates boiler-plate code.
3) IOC and Dependency injection provides advantages in promoting a clean way of configuring dependencies and also to promote the 'implement to interface' paradigm.
Sounds like Spring is the next best thing to sliced bread
but I am genuinely interested to know what factors would make EJB3 a more attractive proposition as compared to Spring.
Any help would be greatly appreciated.