I am new to the concept of dependency injection, and we are currently writing a web application using JSF and possibly Primefaces. We are currently evaluating whether to use Spring or EJB3. I was very close to choosing Spring, but then I heard about CDI. Can you give us some tips that might be best for the following situation:
We are currently pretty new to the J2EE world and don't know if we will use Glassfish or JBoss (or just stick with Tomcat).
The web application is basically a prototype for a corporate CRUD application, which should be able to handle complex business logic. We want to focus on “adaptability” because some of the requirements are not clear and will be determined in about a year (when we find out if we can use the prototype).
We cannot use Hibernate, as we will have to write rather complex SQL expressions. Currently, we have done a great job with SQL abstraction in Spring.
Maybee I am currently comparing apples and oranges, but there is too much information if you are new to j2ee. I think EJB is the standard defined through JCP, Spring is the standard defined by the market, and CDI is the standard that JCP also defines to accomplish what Spring can do. But I'm certainly mistaken, -).
thank,
iuiz