[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Redeploy is done wrong
adrian@jboss.org
do-not-reply at jboss.com
Tue Feb 17 06:05:56 EST 2009
"alesj" wrote :
| >> ps: seen then redeploy issue? :-(
| >
| > Yes, but what's the point in repeating the "hack to a hack" comment. :-(
|
| What's the hack there?
|
"alesj" wrote :
| The wrong part is this:
|
| In (W) we find existing deployment context, hence this means that addition is actually a re-deploy.
| We add existing deployment context to undeploy, and then we create/recognize new one to be deployed.
| And this is what's wrong --> we are actually doing new structure recognition on a deployment that's about to be undeployed --> its temp are gonna be cleared.
| This already reads some VirtualFile refs into the DeploymentContext.
|
"alesj" wrote :
| That this clearly works I added the following change to HDScanner:
|
| | case MODIFIED:
| | mainDeployer.removeDeployment(ctx); // change
| | mainDeployer.process(); // change
| | mainDeployer.addDeployment(ctx);
| | break;
| |
|
| But this is not the right solution, since it's MainDeployer that should transparently handle re-deploys.
|
| What would be the right way to do this?
|
Let's fix it so the two have the same semantics and stop trying to hack around
problems when you already know the correct solution.
i.e. the structure determination is not done until the "deploy" stage of process()
after the "undeploy" stage has been done.
I know why you don't want to do that, but its obviously the correct solution to
the problem identified and will always be cleaner than trying to workaround the
issue at a level (the vfs) that doesn't understand the deployment lifecycle.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210636#4210636
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210636
More information about the jboss-dev-forums
mailing list