2 Replies Latest reply on Aug 5, 2008 10:10 AM by jaikiran

    deployment to remote JBoss - how to make application survive

    zeehond

      We're building an application (Management Console) that will be managing other applications deployed JBoss instances running on remote nodes.

      There's JMX interface and MainDeployer MBean (didn't check JSR88 stuff yet).
      An application is deployed by deploy(URL) method of MainDeployer, so all I need is to expose EAR to be deployed from Management Console via http and pass its URL in a remote JMX call to MainDeployer.

      However, there's a problem.
      Applications being deployed in such a way are stored in /tmp directory (looking at MainDeployer code just confirmed it) and when the server is restarted, they just vanish!

      Of course there are a couple of workarounds, most silly thing I could think about is a tiny 'agent' application that will reside in remote JBoss, accept application to be deployed as file upload and then put it into server's /deploy directory. But this is kinda ugly, with all that jazzy JMX around.

      Better solution, anyone?
      Many thanks in advance.

        • 1. Re: deployment to remote JBoss - how to make application sur
          wolfgangknauf

          Did you ever find out how to do this? JSR88 has the same problem of non-persistent deployment, and I would like to make this running.

          Best regards

          Wolfgang

          • 2. Re: deployment to remote JBoss - how to make application sur
            jaikiran

            When i was working on a similar requirement, i remember extending the MainDeployer to enhance it and copy the deployment to the deploy folder of JBoss. This deployment would then be picked up by the hotdeployer (i had done some additional stuff to ensure that the hotdeployer does not kick in before the copy completes). On systems which had hot deployment disabled, in my code which extended MainDeployer, i would first copy the deployable into the "deploy" folder and then call the MainDeployer deploy method, pointing it to the file in the deploy folder.

            P.S: I had done this just for my sample application. There might be better ways (which i haven't seen being mentioned here in the forums yet) for dealing with this.