Table of Contents
Just a second...

Deployment methods

There are two ways to deploy a DAR file: file copy or HTTP.

File copy

To use this method, copy your DAR file to the deployment directory on the file system. If you enable auto-deployment in the Server.xml configuration file, Diffusion™ periodically scans a directory for new or updated DAR files and deploys them. In the case of an updated DAR, the existing publisher is undeployed (if possible) before being redeployed.

HTTP

If the deploy web service is running, you can POST the DAR file over HTTP. For example, you can use command line tools such as curl to deploy the publisher:
curl --data-binary @MyPublisher.dar http://localhost:8080/deploy
Warning: We recommend you use the HTTP method of deployment in your test environments only. If you enable the deploy web service in your production environment, you must take additional security measures to prevent unauthorized or malicious access to the web service URL. For example, by setting up restrictions in your firewall.
To enable deployment through HTTP, you must enable the web service in the WebServer.xml configuration file. For example, include the following XML:
<http-service name="deploy-service" debug="true”>
	<class>com.pushtechnology.diffusion.service.DeploymentService</class>
	<url-pattern>^/deploy.*</url-pattern>
	<max-inbound-request-size>128m</max-inbound-request-size>
</http-service>

Ensure that the HTTP connector is configured to have an input buffer large enough to contain the entire DAR file. You can configure this in the Connectors.xml configuration file.

Undeployment

For publishers deployed using the file copy method, you can delete the DAR file from the deployment directory and on the next scan the server undeploys the publisher. A DAR file can be undeployed only if all of the publishers it contains are stoppable. If a DAR file fails to be undeployed, any future modifications to it are ignored.

It is important that any files that the deployment process has extracted from the DAR are not deleted until the publisher has been successfully undeployed. Publishers can also be undeployed through Java Management Extensions (JMX) by invoking the undeploy operation on associated MBean, for example
localhost/Server/com.pushtechnology.diffusion - Publisher - MyPublisher - undeploy()