6 Replies Latest reply on Mar 9, 2003 10:30 AM by Raja

    Large war FTP delay, early deployments

    Ken Roberts Newbie

      Hi.

      I've been using JBoss for a while, but this is my first post to a forum.

      I have a deployment process which is built on ant. It builds and then deploys to the customer's site (we make customized applications, which include applets, servlets, ejb's etc) and these deployments can be quite large.

      If my ant process FTP's the file directly to the deploy directory, JBoss will find it and start deploying before it's there. If I ftp to a staging directory and move the war to the deploy directory later, the war deploys fine. I've tried extending the time between checks, but that still doesn't guarantee that JBoss won't attempt to deploy before the file is there.

      My question is this: Would it make sense for JBoss to watch the modification time of the war file, and only deploy new files if they exceed a certain age? Is this possible on all platforms?

      This seems to be a very good idea for our business. It would simplify our deployment process down to having just an ant script on the deployer's system.

      Thanks.

        • 1. Re: Large war FTP delay, early deployments
          Adrian Brock Master

          JBoss uses the last modified time on the file.

          The OS typically sets this when you start copying
          rather than when it finishes.

          The move is an atomic process (provided the source
          and destination are in the same file sytem)
          so you will never have problems with that.

          Regards,
          Adrian

          • 2. Re: Large war FTP delay, early deployments
            Ken Roberts Newbie

            We ARE having problems with it. The source and destination file systems aren't necessarily within the same national boundaries. Our deployment process would ideally ftp the file directly into the deploy directory from the build system, and it sometimes takes a long time relative to the polling times. We aren't using an atomic move, in other words, and the transfer time can be very long if we're going through a VPN.

            • 3. Re: Large war FTP delay, early deployments
              Joel Vogt Master

              I have had the problems deploying from windows to linux. I would suggest using your build to upload it to another directory and then do a copy

              • 4. Re: Large war FTP delay, early deployments
                Ken Roberts Newbie

                That's what we do now, but our customers don't always give us access for a remote login session. The whole point of this thread is to find an alternative to this. If JBoss wouldn't be so enthusiastic about deploying something before it gets there, then we could ftp directly to the deploy directory.

                The way it is now, we have to get the file to a staging directory on the remote host, then get a remote login session and move the file from the staging directory over to the deploy directory. For customers who won't give remote access, that means calling or emailing their IT department to ask somebody to do that for us. In one case, this means that we get on their schedule and, when they get around to it, they'll send somebody over. So far, there hasn't been a response time of less than a day.

                It would seem to me that ours wouldn't be the only company having this issue. Automatic deployments would be much, much more automatic if JBoss could tell if the file weren't there yet. Maybe watch the file size and expect it to be constant for a certain number of seconds before deploying?

                • 5. Re: Large war FTP delay, early deployments
                  James Moring Newbie

                  Add a custom deployer to Jboss that scans a directory that you create that contains your app (.ear I assume). Set the scan interval to some very high number like 2000000000. I did not look but maybe -1 says never scan. At any rate the very high scan interval will prevent the ear being deployed while it is being copied. After the file has arrived completely, use the JMX console to force a directory scan of your custom deployer and hence a re-deployment of your app.

                  • 6. Re: Large war FTP delay, early deployments
                    Raja Master

                    Rename your ear to some .ear.tmp and ftp it to the deploy dir. Once its deployed, rename it to .ear which would take no more than a few milliseconds.