-
1. Re: Should Touching / changing timestamp of exploded folder
alesj Jul 17, 2009 6:46 AM (in response to rob.stryker)This can easily be done:
- http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java
See the usage of hasRootBeenModified(VirtualFile root).
Although I wrote this stuff I don't know why we didn't include this in the first place.
I guess there was a reason, which looks like it slipped my mind. :-(
But instead of this touch hack, we could provide a different StructureModificationChecker,
for those who rely on .class changes.
It would check classes as well as metadata locations. -
2. Re: Should Touching / changing timestamp of exploded folder
dimitris Jul 17, 2009 9:14 AM (in response to rob.stryker)I guess you didn't do it because we didn't support this before.
Conceptually, it makes sense and I think Max asked for this before.
How do you 'touch' a directory on windows? :-) -
3. Re: Should Touching / changing timestamp of exploded folder
jaikiran Jul 19, 2009 10:38 PM (in response to rob.stryker)The earlier versions indirectly supported this kind of the redeployments where you could rename the directory to something like .bak and name it back to the original name. This would trigger a undeployment and then a deployment.
-
4. Re: Should Touching / changing timestamp of exploded folder
rob.stryker Jul 22, 2009 9:47 PM (in response to rob.stryker)For the record, the reason this issue even came up was because some of our tools were able to delete and re-deploy a new version of the app but do so so quickly that the scanner didn't notice the change.
Since there were no descriptors in the deployment the scanner had no way to tell this was a "new" deployment and not the same old one it was used to.
As an example of this, start up a JBoss 5.1 server and execute the following:
mkdir test.war
21:41:08,316 INFO [TomcatDeployment] deploy, ctxPath=/test
21:41:08,343 WARNING [config] Unable to process deployment descriptor for context '/test'
21:41:08,344 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/test'
rm -rf test.war && mkdir test.war
(NOTHING HAPPENS)
rm -rf test.war
21:42:05,379 INFO [TomcatDeployment] undeploy, ctxPath=/test
So clearly we can see the issue I believe ;) Question is, is there a JIRA for this yet? Should I make one? When will this be supported?
Thanks ;) -
5. Re: Should Touching / changing timestamp of exploded folder
rob.stryker Jul 29, 2009 6:33 PM (in response to rob.stryker)added a jira link but not sure if it's filed in the right place.
https://jira.jboss.org/jira/browse/JBMICROCONT-447 -
6. Re: Should Touching / changing timestamp of exploded folder
alesj Jul 31, 2009 10:32 AM (in response to rob.stryker)"rob.stryker@jboss.com" wrote:
added a jira link but not sure if it's filed in the right place.
https://jira.jboss.org/jira/browse/JBMICROCONT-447
It is not; read our MC home page on how MC JIRAs are used. ;-)
I'll move the item this time, but for the next please ask me before issuing one. -
7. Re: Should Touching / changing timestamp of exploded folder
maxandersen Aug 3, 2009 9:45 AM (in response to rob.stryker)"alesj" wrote:
But instead of this touch hack, we could provide a different StructureModificationChecker,
for those who rely on .class changes.
It would check classes as well as metadata locations.
I don't see any usecase for automatic restarting deployment on class changes. That would trigger it too often.
Of course unless ejb3 and others have implemented incrememently deployment updates recently ;) -
8. Re: Should Touching / changing timestamp of exploded folder
jaikiran Aug 3, 2009 9:57 AM (in response to rob.stryker)In this specific usecase (which i think is probably a rare one), i guess all we should do is just check the last modified timestamp of the root of the deployment. Changes to .class files (or any other files) within the deployment will not change the timestamp of the root folder, so we will be safe.
As for how the last modified timestamp of the root directory is changed - it would probably be irrelevant. It would be upto the user to do whatever is necessary to change that timestamp. We just provide a feature which picks up that change.