geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geronimo User" <geronimou...@gmail.com>
Subject How to detect a file changed in an exploded web app.
Date Tue, 12 Dec 2006 21:41:40 GMT
Hello:

I am trying to port an application from JBoss to Geronimo 1.1.1.
Some of what follows is from my memory not from existing deployments, so
there may be small errors in the examples.


In the JBoss application, there is an exploded .war deployed in the JBoss
deploy directory, like this:

C:\Program Files\jboss-4.0.3SP1\server\default\deploy\myapp.war\xml

A stand-alone application writes XML files into the xml directory every n
seconds, e.g.:

C:\Program Files\jboss-
4.0.3SP1\server\default\deploy\myapp.war\xml\Myfile.xml

A Flash applet retrieves the XML files using http, e.g.

http://localhost:8080/context-root/xml/MyFile.xml

and then processes the file and displays the data.

All works fine.


In Geronimo we've tried two approaches.



1. Deploy an exploded .war using the deployer.jar.
This creates an exploded .war in var\temp, e.g.

C:\Program Files\geronimo- 1.1.1\var\temp\my-app\xml

The stand-alone application writes XML files into that directory:

C:\Program Files\geronimo-1.1.1\var\temp\my-app\xml\MyFile.xml

However the browser can't find the XML files when they are requested,
giving a 404 error:

The requested resource (/my-app/xml/MyFile.xml) is not available.


2. Deploy an exploded .war in hot deploy mode, into the deploy directory:

C:\Program Files\geronimo-1.1.1\deploy\my-app\xml

The stand-alone application writes XML files into that directory.

Now the browser can locate and fetch the files.

However the problem now is that approximately every 10 seconds, Geronimo
re-deploys the .war application.

15:57:16,027 INFO  [Hot Deployer] Redeploying my-app
15:57:16,638 INFO  [DirectoryMonitor] Hot deployer notified that an artifact
was removed: com.mycompany/my-app/2.9/war
    Redeployed com.mycompany/my-app/2.9/war


How can we deploy this exploded .war so that
1. The browser can see fetch the most recent XML file written to the xml
directory.
2. Geronimo does not constantly re-deploy the application.

Thanks.

Mime
View raw message