If you have a running Spring Web Flow 2 application, there is the question on how to run it on the SpringSource dm server. The documentation of the SpringSource dm Server contains a detailed instruction on how to migrate a web application to a proprietary PAR archive. With the proprietary PAR format, you save some of the necessary configuration. In this appendix, we show you the important steps.
Note
Chapter 7 of the documentation inside the programmer-guide of the SpringSource dm Server is an important chapter. The chapter is available online at http://static.springsource.com/projects/ dm-server/1.0.x/programmer-guide/html/ch07.html.
1. Because one of the cornerstones of the SpringSource dm Server is the Tomcat Servlet Engine, you can directly run your WAR archive on that server. But you still cannot profit from all the benefits of the SpringSource dm Server. To run your WAR archive, simply copy the archive into the
pickup
folder of the SpringSource dm Server.2. The next step towards OSGi is to remove the libraries from the WAR file and get the dependencies from the container. That is described in Chapter 7.3 of the programmer-guide of SpringSource dm Server at http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s03.html.
Note
Where to get a library that can be used inside the OSGi container?
If you want to use a library in an OSGi container, the library must provide some important information inside the manifest,
MANIFEST.MF
, which is located in theMETA-INF
folder of a JAR archive. For your own libraries, it is not a big task to provide that information in the manifest. Mostly, the manifest is created through your build process. But for external libraries, it is recommended not to add the information manually. The solution is the SpringSource Enterprise Bundle Repository which is located at http://www.springsource.com/repository/app/. That web application contains hundreds of open source libraries, which contain the essential information inside the manifest and can therefore be used inside an OSGi container. Therefore, if you search a library, use that repository. By the way, the SpringSource Enterprise Bundle Repository runs on the SpringSource dm Server, and is therefore one of the first productive applications on that server.3. After you have removed the libraries from your WAR archive and used the libraries directly from the SpringSource dm Server, the next step is to externalize the services. That step is described in Chapter 7.4 of the programmer-guide. The URL of that chapter is http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s04.html.
4. The last step towards the PAR archive is described inside the Chapter 7.5 of the programmer-guide. The URL of that chapter is http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s05.html.