It looks like DeploymentWatcher was added to address some coordination
issues between hot-deploy and other deployment activities.
Here are the comments from when it was first introduced:
Author: ammulder
Date: Fri May 26 15:00:23 2006
New Revision: 409761
URL: http://svn.apache.org/viewvc?rev=409761&view=rev
Log:
Fixes to hot deployer
- If you deploy with the hot deploy dir and then undeploy with the
console or CLI, delete the file from the hot deploy dir so the
hot deployer doesn't get confused (GERONIMO-1431)
- If file in hot deploy dir is updated while server is down,
redeploy it when the server starts up again (GERONIMO-1174)
Joe
Ajay Panagariya wrote:
Hi,
I'm trying to get some deployment related information out of Deployer
using an interface called DeploymentWatcher, described here:
http://geronimo.apache.org/maven/server/modules/geronimo-kernel/apidocs/org/apache/geronimo/kernel/config/DeploymentWatcher.html
Does anyone have an experience writing DeploymentWatcher's? I havn't
been able to find examples in the code. In Deployer.java, there is a
'Collection watchers' object, and from the looks of it, as long as I can
get my DeploymentWatcher into that 'Collection watchers' the deploy
function should run my DeploymentWatcher. The problem is, I can't figure
out how to get my DeploymentWatcher into the 'Collection watchers'
object so that it's seen by the deploy function. Does anyone know the
correct way to do this?
The function that calls the watchers in Deployer.java is called
notifyWatchers, and is called in the deploy function.
Thanks, any help would be appreciated.
-Ajay