You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Ajay Panagariya <ap...@gmail.com> on 2007/06/16 01:50:19 UTC

DeploymentWatcher help needed

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

Re: DeploymentWatcher help needed

Posted by Joe Bohn <jo...@earthlink.net>.
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

Re: DeploymentWatcher help needed

Posted by Manu George <ma...@gmail.com>.
Hi,
        Just write and deploy a gbean that implements the
DeploymentWatcher interface and it will get automatically added to the
collection.

Regards
Manu


On 6/16/07, Anita Kulshreshtha <a_...@yahoo.com> wrote:
> --- Ajay Panagariya <ap...@gmail.com> 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.
>
>      DirectoryHotDeployer in  geronimo-hot-deploy implements
> DeploymentWatcher.
>
> Thanks
> Anita
>
> 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
> >
>
>
>
>
> ____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
>

Re: DeploymentWatcher help needed

Posted by Anita Kulshreshtha <a_...@yahoo.com>.
--- Ajay Panagariya <ap...@gmail.com> 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. 

     DirectoryHotDeployer in  geronimo-hot-deploy implements
DeploymentWatcher. 

Thanks
Anita
 
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
> 



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/