Artifacts can be deployed into the SpringSource dm Server using either the hot-deploy directory on the file system or by using the admin console.
To hot deploy an artifact, copy it into the
$SERVER_HOME/pickup
directory:
cp myapp.par $SERVER_HOME/pickup
When the artifact is deployed, a message similar to the following will appear in the log (time stamps omitted):
[2008-03-08 17:00:00.000] <SPDE0010I> - Deployment of 'myapp.par' version '0' completed.
If there is a problem with the deployment the console and log will both show an error message to help with troubleshooting.
To use the SpringSource Admin Console please see the chapter entitled The Web based Administration Console.
The Admin Console allows you to upload a file, which will be deployed automatically, from your local system to the SpringSource dm Server. Once the artifact is deployed it will appear in the list of artifacts in the Admin Console. Using the upload panel shown below, you can select a file. Please note that the GUI for uploading varies according to the browser and operating system used.
When clicked, the 'Upload' button reloads the page. This may take a few seconds while the file is transmitted and deployed. The list of artifacts will display the newly deployed artifact. If there have been any problems, you can check the status message at the top of the page. This message will otherwise report that 'Application deployed'.
The other fields in the table give the 'Name' of the artifact, which will be the file name if none is supplied. The 'Origin' describes how the artifact was deployed. The possible values are 'Hot Deployed' as described above, 'Admin Console' if deployed through the console and 'Programmatic' if deployed programmatically, that is, through the integrated artifact deployer in the SpringSource dm Server Tools. The version will be '0' if none is supplied. The 'Date' shows when the artifact was last deployed to the dm Server. Finally, the 'Type' tells you if it is an OSGi application or not.
When an artifact is deployed by either method it is copied to the 'work' directory of the SpringSource dm Server file structure. Several other activities take place, for example: it is registered with the SpringSource dm Server, any dependencies it has are checked to see if deployment can go ahead, and finally it is started. Because of this just dropping an artifact into the 'work' directory will not deploy the artifact.
When deploying bundles that have dependencies it is important that you deploy them in the correct order. The SpringSource dm Server will honor this ordering when redeploying artifacts on startup.
If you are using hot deployment, be sure to copy artifacts into the pickup
directory one-by-one. Copying the files in one group provides no guarantees of ordering.