Will Spring support CDI?

siva636 picture siva636 · Aug 30, 2011 · Viewed 7.6k times · Source

Spring has been a good framework for DI and AOP for Java developers.

Now, there comes a standard specification for DI and AOP which is CDI.

Any good product can no longer stays good without supporting the relevant standards. (For example, Hibernate supports JPA specification)

My question is, will Spring support the standard specification (CDI) in its future releases?

Answer

jan groth picture jan groth · Sep 2, 2011

Even though Spring is open source and used and supported by a large community, its future development is controlled by a single company (spring source / vmware). As such, its decisions are inherently non-public and certainly influenced by a large number of factors - like the currents demands of the community, but certainly also financial and political aspects (at the end of the day it's all about money).

So it's important to conclude that spring / spring source is not bound to any official process (such as the JCP would be) and one cannot foresee what spring source will decide in the future. On the other hand, past actions lead to the assumption that spring source is not - cough - specially interested in implementing the full CDI stack (JSR 299). Remember that even though spring source initially joined the JCP for JSR 299 (together with sun, redhat, google, ...), they all had a terrible fight about it which resulted in the fork of JSR 330, which is nothing but a subset of JSR 299. Plus: Implementing the (stateful) CDI model of dependency injection in any future version of spring would be a real bunch of work.

So, to make a long answer short: Even though we don't know about the future, it's pretty safe to assume that spring / spring source will never support JSR 299 as a whole, but stick with their implementation of JSR 330.