[jboss-jira] [JBoss JIRA] Created: (JBAS-5683) Deployments added via DeploymentManager get redeployed by HDScanner

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Thu Jun 26 01:27:58 EDT 2008


Deployments added via DeploymentManager get redeployed by HDScanner
-------------------------------------------------------------------

                 Key: JBAS-5683
                 URL: http://jira.jboss.com/jira/browse/JBAS-5683
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: ProfileService
            Reporter: Brian Stansberry
         Assigned To: Scott M Stark
             Fix For: JBossAS-5.0.0.CR2


There is an inconsistency in the name DeployHandler uses when it adds a deployment to the repository vs. what SerializableDeploymentRepository.getModifiedDeployments() checks when looking for added content.  Result is content that has already been added and deployed gets included in the modification list as ModifyStatus.ADDED, and the MainDeployer redeploys it..

For example, say I have a file whose VFS path name is "http-sr.war".  I use the DeploymentManager to distribute and start it:

String name = file.getPathName();
DeploymentProgress progress = this.deploymentManager.distribute(name, DEPLOYMENT_PHASE, file.toURL());
progress.run();
progress = this.deploymentManager.start(DEPLOYMENT_PHASE, name);
progress.run();

This results in DeployHandler, start(...) making the following call:

VirtualFile vf = deploymentRepository.getDeploymentContent(name, dtID.getPhase());
...
deploymentRepository.addDeployment(vf.getName(), vfsd, dtID.getPhase());

where vf.getName() returns "http-sr.war"

However, getModifiedDeployments() uses the full URI of the virtual file when checking if a child is already deployed.  

VirtualFile deployDir = VFS.getRoot(applicationDir.toURI());
List<VirtualFile> children = deployDir.getChildren();
for(VirtualFile vf : children)
{
     String key = vf.toURI().toString();
      if( applicationCtxs.containsKey(key) == false )
      {
             VFSDeployment ctx = loadDeploymentData(vf);
              ModificationInfo info = new ModificationInfo(ctx, vf.getLastModified(), ModifyStatus.ADDED);
....

Result is the existing key is not found and the content is redeployed. (A duplicate key/value pair ends up in the applicationCtxs map as well, which likely will have bad effects.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list