Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

20.5. Spring Application Context as a Seam Component

Although it is possible to use the Spring ContextLoaderListener to start your application's Spring ApplicationContext there are a couple of limitations.
  • the Spring ApplicationContext must be started after the SeamListener
  • it can be tricky starting a Spring ApplicationContext for use in Seam unit and integration tests
To overcome these two limitations the Spring integration includes a Seam component that will start a Spring ApplicationContext. To use this Seam component place the <spring:context-loader/> definition in the components.xml. Specify your Spring context file location in the config-locations attribute. If more than one config file is needed you can place them in the nested <spring:config-locations/> element following standard components.xml multi value practices.
<components xmlns="https://jboss.com/products/seam/components" 
            xmlns:spring="https://jboss.com/products/seam/spring"
            xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="https://jboss.com/products/seam/components https://jboss.com/products/seam/components-1.2.xsd
                                https://jboss.com/products/seam/spring https://jboss.com/products/seam/spring-1.2.xsd">

	<spring:context-loader context-locations="/WEB-INF/applicationContext.xml"/>

</components>

 
 
  Published under the terms of the Open Publication License Design by Interspire