## Updating a product or extension

By following the prescribed procedures for packaging and installing products, we can take advantage of the platform update manager, which treats products and extensions in a uniform way and allows users to discover and install updated versions of products and extensions.

Before looking at the implementation of such a server, it's important to revisit some important concepts:

- The platform provides a framework for defining features and update sites. The platform itself defines a concrete implementation of features and sites. This concrete implementation is what allows the update server to upgrade and install additional features.
- The platform update server can be used to update products by installing new versions of features. It can also be used to install or update extensions by adding or upgrading features. This is only possible for products and extensions that conform to the platform's concrete implementation of features and sites and conform to the appropriate install guidelines.
- Developers are free to use native installers and uninstallers to upgrade their own products and extensions without regard to sites and the update manager.

That said, what do we do if we want to fully participate in the platform update support as defined by the default implementation?

### Feature and plug-in packaging

The previous example product and extension directory structures show how features and plug-ins are laid out once they are installed. In order to install features using the update server, the features must be packaged in a feature archive file. This is described in Feature Archive Files.

Plug-ins and fragments must be packaged according to the format described in Plug-in Archive Files.

### Update server layout

The update server must be a URL-accessible server with a fixed layout. The list of available features and plug-ins provided by the server is described in a site map file, site.xml. The update server URL can be specified a full URL to the site map file, or a URL of a directory path containing the site map. The site map file contains a list of all the available features and the location of the feature archives on the server. It also describes the locations of the plug-in archives that are referenced in the feature manifest.

A simple site layout for our example web product and extension could look something like this:

    <site root>/
    	site.xml
    	features/	(contains feature archive files)
    		com.example.acme.acmefeature_1.0.1.jar
    		com.example.betterwebs.betterfeature_1.0.1.jar
    		...
    	plugins/	(contains plug-in archive files)
    		com.example.acme.acmefeature_1.0.1.jar
    		com.example.acme.acmewebsupport_1.0.3.jar
    		com.example.betterwebs.betterfeature_1.0.1.jar
    		com.example.betterwebs.betterwebsupport_1.0.1.jar
    		...

The complete definition for the site map is described in Update Server Site Map.