Prev |  | Next

## Form Tags as a Plan

Plans (see Creating Plans ) allow us to package and deploy the Form Tags application in a more flexible way. Instead of packaging all the bundles of the application into a single PAR file, each bundle can be placed in the repository and referred to in a plan .

The bundles to be placed in a repository in the chain (for example, `repository/usr` ) are:

    org.springframework.showcase.formtags.domain-2.0.0.RELEASE.jar
    org.springframework.showcase.formtags.service-2.0.0.RELEASE.jar
    org.springframework.showcase.formtags.web-2.0.0.RELEASE.war

which are just those files which were part of the PAR.

Here is the contents of a suitable plan file for the Form Tags example:

    <?xml version="1.0" encoding="UTF-8"?>
    <plan name="formtags.plan" version="2.0.0" scoped="true" atomic="true"
            xmlns="http://www.eclipse.org/virgo/schema/plan"
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		xsi:schemaLocation="
    		        http://www.eclipse.org/virgo/schema/plan
    		        http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">

    	<artifact type="bundle" name="org.springframework.showcase.formtags.domain_par" version="[3.0,3.1)"/>
    	<artifact type="bundle" name="org.springframework.showcase.formtags.service_par" version="[3.0,3.1)"/>
    	<artifact type="bundle" name="org.springframework.showcase.formtags.web_par" version="[3.0,3.1)"/>

    </plan>

where we have chosen to use any of the artifacts in the version range [2.0,2.1). This plan (as a file called, for example, `formtags.plan` ) can be deployed in any of the normal ways (for example, dropped in the `pickup` directory).

When the plan is deployed, the artifacts it references are installed from the repository and deployed in the order given in the plan file. Because this plan is scoped and atomic, the collection is given an application scope and is started and stopped as a single unit.

Prev | Up | Next
| Home |