Spring Framework
There are some best practices to develop Spring Framework applications that can run successfully in a WAS 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 or later, use Spring Framework Version 2.5.5 or later.
In general, if both WebSphere Application Server 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 that the application is based on the open standards that the application server supports and has flexibility for future deployment. Also, you ensure that the application can use the qualities of service that the application server provides, such as security, workload management, and high availability.
Subtopics
- (zos) 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 WebSphere Application Server.
- (zos) Data access and the Spring Framework
For Spring beans to access a data source, configure those beans so that the Spring Framework delegates to, and integrates with, the WAS runtime correctly.
- (zos) Transaction support and the Spring Framework
For Spring Framework Version 2.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 Version 2.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.
- (zos) JMX and MBeans with the Spring Framework
WAS v6.1 and later supports Spring JMX MBeans.
- (zos) JMS and the Spring Framework
A Spring Framework application can use the JMSTemplate class to send JMS messages or receive synchronous JMS messages.
- (zos) Class loaders and the Spring Framework
We can avoid potential problems with the class loading of JAR files and resources.
- (zos) Thread management and the Spring Framework
Use the information in the following sections to avoid potential problems with unmanaged threads.
Related tasks
Configure access to a Spring application data source
Related information:
Use Spring and Hibernate with WebSphere Application Server
Spring Documentation