An architecture is the the abstract design concept of an application. Basically, a structure of the moving parts and how they're connected.
A framework is a pre-built general or special purpose architecture that's designed to be extended.
If an architecture is the design of a structure, a framework is the architecture of a foundation. Frameworks are specifically designed to be built on or extended.
Some frameworks deal primarily with scaffolding. Meaning, they provide pre-built modules that are easy to use/extend to save the developer from having to create them from scratch. For instance, most MVC web frameworks (ex django, pylons, codeigniter) make it much easier to implement sessions, database connections, templating, etc...
In your case. Spring and EJB are both scaffolding MVC frameworks, each with their own trade-offs.