The Spring framework is a popular but non-standard open source framework. It is primarily developed by and controlled by Interface Inc. The architecture of the Spring framework is based upon the Dependency Injection (DI) design pattern. Spring can work standalone or with existing application servers and makes heavy use of XML configuration files.
The EJB framework is a standard framework defined by the Java Community Process (JCP) and supported by all major J2EE vendors. Open source and commercial implementations of pre-release EJB 3.0 specifications are already available from JBoss and Oracle. EJB makes heavy use of Java annotations.
Some more Comparison of EJB vs Spring