2 Replies Latest reply on Aug 10, 2012 9:13 AM by Xavier Coulon

    Undeploying project when server stops

    Xavier Coulon Newbie

      Hello,

       

      I'm opening this discussion to see if we could change de default behavior of the current server adapter. From what I've seen, an Eclipse project is never undeployed from the local app server (JBoss AS 7.1 in my case) when it is stopped.

       

      This has the following side effects: when I want to use the same AS7 from command-line or from another workspace to work on other projects, I can see my initial Eclipse project being deployed/started at launch time, which is a bit annoying.

       

      Is this something that could be considered ?

       

      Thanks

      Best regards,

       

      Xavier

        • 1. Re: Undeploying project when server stops
          Rob Stryker Master

          Hi Xavier:

           

          The current behavior is that on each 'startup' of the server, it adds and removes deployment scanners to line them up with what should be there. For example, if you're in workspace 1, and have deployments in metadata, customfolder1, customfolder2,  all 3 of those will be added as deployment scanners. If you then shut down the server, switch workspaces to workspace2, and start the server, it will remove those 3 folders as required and add the folders required in the current workspace.

           

          The only time this workflow fails is if you intend to start the server from command line. In that case, all recent scanners are still present, and need to be removed.

           

          Removing all scanners, as you suggest, would need to be done in the 'stop' command, before executing the actual stop. THis is what makes it a bit difficult to do. Are you the results I describe when switching workspaces? Or does workspace1 deployments still end up inside workspace2?

           

          The other problem is that if the server is ever launched in workspace adn then force shutdown, the next startup from command line will still have the old deployment scanners enabled.

          • 2. Re: Undeploying project when server stops
            Xavier Coulon Newbie

            Hi Rob,

             

            Let me clarify: when I switch from workspace1 to workspace2, the server adapter does not show the deployed applications from workspace1 (which makes sense), but when I start the server, I see that these applications are still deployed and started, which, when working on workspace2, does not make any sense.

             

            So, maybe the problem is that by default, the server adapter deploys the workspace applications in the default appserver 'standalone/deployments' folder ?

             

            Thanks

            Best regards,

            Xavier