Java tutorial/code – How Spring Flexibility distinguishes it from other J2ee frameworks

Sometimes it is not possible to completely switch to a different framework. Spring does not force to use everything. Existing front-ends built using Web Work, Struts or other UI frameworks can be integrated perfectly well with a Spring-based middle-tier, allowing you to use the transaction features that Spring offers. The only things you need to do are wire up your business logic using an ApplicationContext and integrate your web layer using a WebApplicationContext.

Similiarly If you need to access existing code via web services, you can use Spring’s Hessian, Burlap, Rmi or JaxRpcProxyFactory classes. That enables remote access to existing applications very easy. Even old java objects can be wrapped in Stateless EJB’s.

Java tutorial/code – How to choose between BeanFactory and ApplicationContext Interface in IOC container

The org.springframework.beans and org.springframework.context packages provide the basis for the Spring Framework’s IoC container. The ApplicationContext interface is superset of BeanFactory implementations like and adds other functionality such as easier integration with Spring’s AOP features, event propagation, and application-layer specific contexts such as the WebApplicationContext for use in web applications. So ApplicationContext is more preferred in general case.