WAS v8.5 > WebSphere applications > Spring applicationsSpring Framework
There are some best practices to develop Spring Framework applications that can run successfully in a WebSphere Application Server environment.
The Spring Framework is an open source project that provides a framework for simple Java objects that enables them to use the Java EE container through wrapper classes and XML configuration.
We can use the Spring Framework with WAS v6.0.2 and later, but some supported features require a specific release of the product. When this situation applies, it is stated in the relevant topic.
For WAS v7.0 or later, use Spring Framework v2.5.5 or later.
In general, if both WAS and the Spring Framework provide a service, it is preferable to design the application to use the service in the application server directly. In this way, you ensure the application is based on the open standards the application server supports and has flexibility for future deployment. Also, you ensure the application can use the qualities of service the application server provides, such as security, workload management, and high availability.
Subtopics
- Presentation layer and the Spring Framework
We can use the Spring Web model view controller (MVC) framework and the Spring Framework Portlet MVC framework with WAS.- Data access and the Spring Framework
For Spring beans to access a data source, configure those beans so the Spring Framework delegates to, and integrates with, the WAS runtime correctly.- Transaction support and the Spring Framework
For Spring Framework v2.5 or later, we can use the declarative transaction model, use the Spring Framework support for the AspectJ programming extension, or use annotation-based transaction support. For versions of the Spring Framework earlier than v2.5, and for versions of the application server that do not provide the UOWManager interface, we can use a Spring Framework configuration that supports a restricted set of transaction attributes.- JMX and MBeans with the Spring Framework
WAS v6.1 and later supports Spring JMX MBeans.- JMS and the Spring Framework
A Spring Framework application can use the JMSTemplate class to send JMS messages or receive synchronous JMS messages.- Class loaders and the Spring Framework
We can avoid potential problems with the class loading of JAR files and resources.- Thread management and the Spring Framework
Use the information in the following sections to avoid potential problems with unmanaged threads.
Related
Configure access to a Spring application data source
Related information:
Use Spring and Hibernate with WAS