Version 0.3
Copyright © 2007 Lars Vogel
10.12.2008
| Revision History | ||
|---|---|---|
| Revision 0.1 - 0.2 | 19.04.2008 | Lars Vogel |
| First rought versions | ||
| Revision 0.3 | 10.12.2008 | Lars Vogel |
| Included the deployment of OSGi bundles. | ||
Abstract
This article describes how to install and run OSGI bundles on the Spring dm server. It first describes how to install and start the SpringSource dm Server. It then describes the installation of the Eclipse plugins to make the usage of the Spring dm server easier with Eclipse and describes how to setup the dm server in Eclipse. The article describes then how to connect to the Spring dm OSGi console. Finally the deployment of an OSGi bundle to the Spring dm server is explained.
Table of Contents
Spring source dm server is a module-based Java application server based on Apache Tomcat and OSGi-based technologies. It consists out of:
The Spring Framework
Apache Tomcat
OSGi (using Equinox as implementation)
Spring Dynamic Modules (Spring DM)
SpringSource Tool Suite (Eclipse plugins)
The Spring source dm server is in the following article called "server".
Download the server from http://www.springsource.com/download/dmserver
Download the binary version and extract to a place on your harddrive, e.g. to the directory C:\Program Files\springsource-dm-server.
To start the application server select the bin directory and double-click on startup.bat.
To test if the server is running select the following URL http://localhost:8080/. The following screen should be displayed

To start the admin console click on the link "admin console". The default user is "admin" with the password "springsource".
For an explanation of the Eclipse update manager please see here: See Using the Eclipse Update Manager
Using the Eclipse update manager install the Java EE Developer Tools from the Eclipse 3.4 distribution.
We will use the Spring IDE and Source Source Application Platform tools for Eclipse to develop for the the server.
Install the Spring IDE from http://springide.org/updatesite/ using the Eclipse Update Manager. Required is only the Core package.
Install the SpringSource Application Platform Tools 1.0.0 from http://static.springsource.com/projects/sts-dm-server/update/ using the Eclipse Update Manager. Required is only the Core package.
Select the Server-> Servers view, right mouse click on it and select New ->Server.

Maintain the following.


Press finish.
Spring dm starts also a OSGi console which by default runs on port 2401. Use for example the program "putty" to connect the OSGi console via telnet.
You can deploy an OSGi bundle by putting it into the "pickup" directory
For an example how develop a plugin see OSGi development with Eclipse Equinox. Create a plugin and export it to the pickup directory. Spring dm server constantly checks the directory for new plugins. Your plugins will then be copied into the work directory.
After a while you should see the plugins in the OSGi console.
You see then the output of your bundles in the directory "serviceability/trace/de.vogella.osgi.firstbundle-1" in the file "trace.log".

Thank you for practicing with this tutorial.
I maintain this tutorial in my private time. If you like the information please help me by donating or byBefore posting questions, please see the vogella FAQ . If you have questions or find an error in this article please use the www.vogella.de Google Group . I have created a short list how to create good questions which might also help you. .
http://www.vogella.de/code/codejava.html Source Code of Examples
http://www.springframework.org/ Homepage of the Spring Framework
http://forum.springframework.org/ Spring Discussion Forum
http://www.springsource.com Homepage of the Spring Source Application Server
http://www.springsource.com/repository/app/ SpringSource Enterprise Bundle Repository - Provides OSGi bundles for the most commonly used Open Source projects