"dimitris(a)jboss.org" wrote :
| Obviously the usecase of re-deploying a jar is quite common and needs to be addressed.
What if we jboss.vfs.forceNoReaper=true by default?
|
I would still leave it at false.
I was able to do a legit workaround the issue,
while global VFS setting is still at NoReaper==false.
I add the following piece to UndeployBrokenPackageUnitTestCase:
| assertTrue(thejar.delete()); // TODO - this should work
| Files.copy(goodjar, thejar);
| getLog().info("Redeploying testPackage: " + testPackage);
|
so that assert should complain before if things cannot me mounted together.
If I add the following code to old MainDeployer::deploy
| VFS vfs = VFS.getVFS(url);
| VFSUtils.enableNoReaper(vfs);
| VirtualFile file = vfs.getRoot();
| VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
|
the test passes w/o any problems.
In this case it's actually the file openness that prevents it from being overridden.
Reaper is holding it open for 5sec to get better read performance,
but the client == test tries to override it in less than 5sec.
I think users don't really intend to re-deploy things in less than 5sec,
so we should be fine. :-)
If this becomes a more serious issue for users,
we can always add some option to ProfileImpl,
to either use VFSUtils + VFS to enable/disable certain options.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190119#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...