6 Replies Latest reply on Apr 12, 2005 8:12 PM by paulkuit

    Remote Deployment

    manfred

      Hi,

      I would like to have/do "remote deployment" into
      jboss (via tool XY):

      - .ear/war./.xml is on my local machine
      - calling XY via commandline/ant/web-interface
      - XY doing a (http?) upload of the file(s)
      - XY puts files into /deploy
      - done ?!

      After scanning some posts there seems noe ready to use
      utility/webapp to do this [JMXConsole+Deployer does not
      upload the files] ?

      What would be the best way to do this:

      - a webapp that does an upload and stores the
      file into /deploy (autodeployer will do the rest)

      - an utility that passes the file to the
      deployer-jmx (ByteStream or whatever it accepts)
      via rmi

      In addition I could create an ant-task that could
      call the above solution

        • 1. Re: Remote Deployment

          There is a task in the 3.1 source tree
          varia/src/main/org/jboss/ant/JMX.java for
          managing JBoss from an ant script.

          JBoss does not differentiate between
          deploy("http://remote.com/myapp.jar");
          and deploy("file:/.../deploy/myapp.jar");

          If you want the deployment to survive a restart (without
          manually deploying) you'll either have to add the
          remote url to deployment scanner in jboss-service.xml
          or write your own service to copy the remote url
          into deploy.
          NOTE: You can get problems with remote copying because
          the DeploymentScanner might spot the file and deploy it
          before it has fully finished copying.

          Regards,
          Adrian

          • 2. Re: Remote Deployment
            manfred

            Ups right,

            I tested it. And additionally an xy.txt will also be deployed via JarDeployer.
            a jmx stop() on MainDeployer and JarDeployer did not
            change this.

            So my hope to copy the file into /deploy with a
            "wrong" suffix and renaming afterwards is gone.

            Any suggestion ?

            Manfred
            www.regele.org

            • 3. Re: Remote Deployment
              manfred

              Ups right,

              I tested it. And additionally an xy.txt will also be deployed via JarDeployer.
              a jmx stop() on MainDeployer and JarDeployer did not
              change this.

              So my hope to copy the file into /deploy with a
              "wrong" suffix and renaming afterwards is gone.

              Any suggestion ?

              Manfred
              www.regele.org

              • 4. Re: Remote Deployment

                Put a leading full stop in front of the name.
                The deployment scanner can be configured to ignore
                files with a certain pattern, look in jboss-service.xml
                at the deployment filter.

                Regards,
                Adrian

                • 5. Re: Remote Deployment
                  manfred

                  Bingo,

                  Thanks Adrian,

                  ".*" or "*.bak" will work for my problem. Seen in
                  jboss-service.xml and tested.

                  Manfred.
                  (hopefully with remote deployment after some work;-> ).



                  • 6. Re: Remote Deployment
                    paulkuit

                    I wrote a very simple .war (9Kb) that uploads a(ny) file over HTTP and writes it to (your deploy) directory. Mail me and I can send it. (paul.kuit@comsol.com.br)