11 Replies Latest reply on Dec 12, 2001 2:30 PM by b_shan

    AutoDeployment "rate"

    mrminutia

      I've searched the forums, but no one seems to have my problem. Our application EAR, once built, is about 9MB in size. If I try to redeploy it by copying it to the 'deploy' directory, JBoss tries to pick it up too fast. The copy isn't complete before JBoss starts trying to unpack it. I get a deployment error (because it tried to deploy half a file) and then JBoss never tries again.

      Is there a setting for the AutoDeployer that says I can make it wait longer before checking the directory (polling speed)?

      I'm running JBoss 2.4.3_Jetty 3.1.3-1 on Windows 2000SP2.

      Jesse

        • 1. Re: AutoDeployment
          lepe

          I've been thinking of have this 'wait' to be settable from jcml and 8082, and maybe to completly switch it on/off and a method to force a check immediatly.

          Would that be something to have?

          • 2. Re: AutoDeployment
            marc.fleury

            I definitely think so, it is in a fact an annoying problem I have as well, I have been trying to think about the algorythm for it but it is unclear,

            It seems the X seconds wait, X settable through the interface is the simplest way to do this. It won't be fool proof but it definitely the simplest.

            • 3. Re: AutoDeployment
              mrminutia

              I like the concept of being able to turn off the polling while you copy a file then tell JBoss to redeploy a particular ear/war/jar. Once complete, you could turn polling back on for the simpler re-deployments.

              Jesse

              • 4. Re: AutoDeployment
                marc.fleury

                > I like the concept of being able to turn off the
                > polling while you copy a file then tell JBoss to
                > redeploy a particular ear/war/jar. Once complete,
                > you could turn polling back on for the simpler
                > re-deployments.
                >
                > Jesse


                yes but that won't work since you need a way to talk to the autodeployer while you are updating your file. However it is a new process that does that (ant, drag and drop windows, whatever) so that we would need a call back from the *filesystem* to let you know taht "don't move"...

                the ideal simplest would be taht timestamps are not updated **until** the file is completely copied over but this is not the way windows works, (nor linux for that matter), as soon as the file handle is touched the timestamp is udpated.

                • 5. Re: AutoDeployment
                  mrminutia

                  We can't talk to the AutoDeployer via a management command? I thought it was an MBean (not that I understand those fully).

                  The other app servers have ways of announcing to the server a new file is there. This is how to hot deploy/undeploy things. I'd think there should at least be a way to do this while at the same time telling the autodeployer to turn off via a management screen.

                  Granted, there still remains the use case of people building their applications and automatically sending the file to a directory. I see this as the probable design impetus for the autodeployer. Fact is, though, this requirement's implementation is conflicting with function.

                  After I debug why JAWS is ignoring a column-name, I'll check into this AutoDeployer thing and see if I can come up with a solution.

                  Jesse

                  • 6. Re: AutoDeployment
                    ndecker

                    I never had this problem myself, but a simple solution comes into my mind.

                    Make a directory deploy.copy, copy the file into this directory and when the copying is done, move it into the deploy directory.

                    If those two directories are on the same filesystem, moving should be atomic.

                    Hope this helps...
                    Nils

                    • 7. Re: AutoDeployment
                      mrminutia

                      Atomic? I was unaware EXT2 or NTFS had this feature. Is this something I can turn on, because it's obviously off by default, and for good reason. Some programs rely on the fact that a file is never "finished". Also, I'm running on the same filesystem/drive with NTFS, so it must be a setting.

                      Jesse

                      • 8. Re: AutoDeployment
                        marc.fleury

                        > We can't talk to the AutoDeployer via a management
                        > command? I thought it was an MBean (not that I
                        > understand those fully).

                        No somber cretin, how can your ****filesystem**** talk to the MBean????? you have to hardcode this in your ant scripts but we can't build that for you.

                        We (JBoss app server and java clients) can, NT can't.
                        I have the same problem on other machines and it is heuristic solution, meaning we need to make guesses on a deployment.

                        > The other app servers have ways of announcing to the
                        > server a new file is there. This is how to hot
                        > deploy/undeploy things. I'd think there should at
                        > least be a way to do this while at the same time
                        > telling the autodeployer to turn off via a management
                        > screen.

                        Oh that is already there, you can turn off the autodeployer and tell the respective deployers to deploy URL manually.

                        > After I debug why JAWS is ignoring a column-name,
                        > I'll check into this AutoDeployer thing and see if I
                        > can come up with a solution.

                        Sure I would be curious to see what you come up with. Try to make it foolproof.

                        marcf

                        • 9. Re: AutoDeployment
                          marc.fleury

                          > I never had this problem myself, but a simple
                          > solution comes into my mind.

                          It occurs on large EARS with autodeployer set too fast, the symptom is "2 deployments" instead of one, an annoyance more than a show stopper, easily fixable by changing the rate of the AD to something larger than teh time it takes to copy 9mb files.

                          > Make a directory deploy.copy, copy the file into this
                          > directory and when the copying is done, move it into
                          > the deploy directory.
                          >
                          > If those two directories are on the same filesystem,
                          > moving should be atomic.

                          It isn't unfortunately, both on windows and linux it seems that the timestamp is modified as soon as you get a handle and thus the AutoDeployer kicks in at the beginning and when you are done updating the time stamp is changed again, something like that.

                          The filesystems don't view copying as "atomic" opertions in timestamp

                          marcf

                          • 10. Re: AutoDeployment
                            mrminutia

                            > > We can't talk to the AutoDeployer via a management
                            > > command? I thought it was an MBean (not that I
                            > > understand those fully).
                            >
                            > No somber cretin, how can your ****filesystem****
                            > talk to the MBean????? you have to hardcode this in
                            > your ant scripts but we can't build that for you.

                            I meant can't we dynamically change the polling rate via a management screen, not through the filesystem or Ant. I didn't want to have to change jboss.jcml and restart the server. Last I checked I was quite aware of my limitations in having the filesystem do anything like this.

                            Alas, you have mentioned this is possible. I'll dig through the docs to see where AutoDeploy gets configured for polling rate. There's nothing set in the distributed jcml file.

                            Jesse

                            • 11. Re: AutoDeployment
                              b_shan

                              i also have a simple work around that i quickly just tested:

                              1. copy the file as a *.jarx file or something
                              2. rename it when the copy is done..


                              i havent actually had this problem, so i dont know how robust this work around is.. good luck