WAS v8.5 > Reference > Developer best practicesAdditional Spring component implementation features
WAS v8.5 supports Spring implementation features that are not defined in the SCA Spring Implementation specification.
WAS v8.5 supports the following features:
- Constructor injection
WAS v8.5 supports the injection of SCA references and properties within Spring bean constructors. Define <constructor-arg> elements that specify the appropriate type of the SCA references or properties to use. If the elements do not specify the type attribute, then at least specify the index attribute. WAS v8.5 only supports constructor injection when the Spring bean has a single constructor.
- Using the ClassPathXmlApplicationContext bean definition
When the ClassPathXMLApplicationContext bean definition is in an application context, only the beans and properties defined in the top-level application context can be mapped, either explicitly or implicitly, to SCA resources.
WAS v8.5 does not support using a FileSystemXMLApplicationContext definition to load an application context file.
- <import> elements in application context files
WAS v8.5 supports use of <import> elements in application context files. Each <import> element points to an application context XML file; for example:
<bean> <import resource="services.xml"/> <import resource="resources/messageSource.xml"/> <import resource="/resources/themeSource.xml"/> <bean..."/> <bean..."/> </beans>
Related
Use Spring 2.5.5 containers in SCA applications