Shouldn't JBoss reload the app if I touch the main XML? Or do I have to tell JBoss to do so?
yes it should and it will.
What is the deployment scan period defined in $JBOSS_HOME/server/node/conf/jboss-service.xml?
I found the reason: another slash was missing at the end of the deployment URL.
Without it, the application loaded fine but did not reload. With the slash everything works as expected.
Strange though, that JBoss has such an inconsistent behavior. Shouldn't it refuse to load the app if the slash was missing?
Anyways, thanks for your help.
Where was the slash missing? Can you post the exact file contents (the file which you are talking about)?
Well, it was jboss-service.xml.
It didn't work when I set the urls to this:
deploy/,file:///C:/Development/Projects/MyApp/web/client/webapp (myapp.ear is a subdirectory of this).
When I added the slash to the end, it worked:
But maybe I found a reason: according to the documentation, JBoss is considering the .../webapp directory as the application's dir and myapp.ear as a nested module. So it loaded the module but only reloads the app if the main project's descriptor is touched (which would be missing if webapp had been considered to be the main porject).
Is this correct?
I see what you mean, now. The trailing slash indicates that the folder will contain applications. If the trailing slash is not present then the folder itself is considered an application. That's what my understanding is with how it worked in 4.x AS. See Peter's reply here http://www.jboss.org/index.html?module=bb&op=viewtopic&t=163135#4263202
There was one more thread where there was an explanation (/bug report?) about how the hot deployment behaves (probably weirdly) with applications deployed external to the AS structure in JBoss AS 4.x, but i don't seem to find that thread now.
Thanks for the info.
The one weirdness I recall from using external directories in 4.x is that they are scanned only during startup. Thus hot deployment, redeployment, etc. does not work in them.
To be more accurate, only the first deployment directory listed is subject to hot deployment. In some cases, listing the external directory first, and thus the servers/xxx/deploy directory second, was beneficial because the server/xxx/deploy directory would never be rescanned after startup.
This all changed in AS 5.x - all of the deployment directories are scanned by the hot deployer . But then in AS 5.x you can only specify directories, not archives, in the deployment URLList, IIRC.
As far I I am concerned hot deployment works for external directories, too.
My problem was the missing slash at the end that made JBoss think the external directory resembled that app and not a deployment directory.