geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Can an event be triggered by deployment?
Date Tue, 13 Jun 2006 19:57:49 GMT
You can create a GBean to do this.  Either you can add a GBean to the
WAR that copes the file into the WAR in its doStart method (which
would be called when the web app was started), or (in 1.1) you can
create and deploy a standalone GBean that implements DeploymentWatcher
and it can take action every time it sees a web app deployed (to copy
a file into the web app directory).

Thanks,
    Aaron

On 6/13/06, Chris Wilkes <cwilkes-ger@ladro.com> wrote:
> A 3rd party library in our webapp requires a license file -- the only
> way I've been able to have the webapp read it is to put it into the
> WEB-INF/classes directory.
>
> Unfortunately this license file is per server, meaning that I would have
> to make a war file for every server that we deploy to.  This could
> easily lead to a problem where the war for ServerA is used in ServerB.
>
> Is it possible to have an event triggered on deployment so that
> geronimo could copy a known file to the just deployed webapp's
> WEB-INF/classes directory?  I realize this is a very weird case and I'll
> probably end up writing something in my app that copies the file itself.
>
> If I have my app copy the file itself is there a way to make sure this
> is the first thing done when the webapp starts?  I'm not aware of a way
> to do this in Tomcat.
>
> Is there a way to tell geronimo that a non-jar should be included in the
> classpath?  If so I could tell geronimo to include that license file and
> the 3rd party app should see it.
>
> Chris
>

Mime
View raw message