Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3474

JSR88 undeploy assumes state that was created during deploy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Final
    • 7.1.0.CR1b
    • JSR88
    • None

    Description

      This is a followup of some mailing list discussion, tested against 7.1.0CR1 and 7.1.0 snapshot from 2012-01-13.

      It seems that JSR88 undeployment is not working under certain circumstances. Attached is a full sample.

      ======================
      It works, when doing this:
      After deploy, I get a TargetModuleID from the ProgressObject.
      TargetModuleID[] modules = myProgressObject.getResultTargetModuleIDs();

      If i perform an undeploy directly after deploying using this TargetModuleID array, it works.

      This is an array with one item. The output of "toString" for this items is this:
      [target=http://org.jboss.as.ee.deployment/jsr88?targetType=as7&serverHost=localhost&serverPort=9999,parent=null,type=ear,id=file:/C:/DOCUME~1/Knuffi/LOCALS~1/Temp/Stateless.ear]

      ======================
      But in my undeploy job, I call "DeploymentManager.getAvailableModules" and search a file matching my name.
      So I find this module ("toString" output):
      [target=http://org.jboss.as.ee.deployment/jsr88?targetType=as7&serverHost=localhost&serverPort=9999,parent=null,type=ear,id=file:/C:/DOCUME~1/Knuffi/LOCALS~1/Temp/Stateless.ear]

      It seems to be identical to the above output, but undeploying a TargetModule array with this one item does not work: there is no status output on the server, though the client side seems to complete successfully.

      ======================
      Attached ("JSR88Test.zip") is my deployer code as a self running sample, including the EAR file for deployment.
      To run it:
      1) Import project in Eclipse.
      2) Update build paths.
      3) Compile (ignore my two warnings - they are just markers for myself)
      4) edit "build.xml" and modify the property "serverRootDirectory" to point to your JBoss installation
      5) open "build.xml" using Eclipse and run the target "deploy.j2ee.ear". The archive "Stateless.ear" (included in project root directory) should be deployed.
      6) run the target "undeploy.j2ee.ear" => EAR should be undeployed, but this does not work.

      If you add an undeploy call directly after deployment in step 6 using the deployed TargetModuleID, it works. But it does not work when undeploying later (which should probably be the standard use case )

      Attachments

        Activity

          People

            tdiesler@redhat.com Thomas Diesler
            wolfgangknauf Wolfgang Knauf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: