9 Replies Latest reply on Mar 1, 2005 7:30 AM by Jochen Riedlinger

    Hot Deploy not Deploying, sort of

    Dave Pagel Newbie

      Question for all of ya'll smart people roaming the forums.

      Two days ago, our server needed to be shut down but all was well. JBoss worked flawlessly. But, after the shutdown, a few little quirks emerged for some odd reason. The biggest and foremost is the hot deploy. When I put a newer version of an EJB into the container, the server actually says it's undeploying the old version and deploying the new version. However, when I load my client, nothing has changed. Keep in mind, this worked last week.

      It's almost like all the EJB's are being cached somewhere and not updated.

      I'd like to thank you in advance for any responses.


      Running JBoss 3.2.5 on RedHat Enterprise Server

        • 1. Re: Hot Deploy not Deploying, sort of
          Scott Stark Master

          jboss does not cache deployments across restarts so you will have to debug this further.

          • 2. Re: Hot Deploy not Deploying, sort of
            Dave Pagel Newbie

            I'm sorry if I wasn't clear...

            I don't want it to cache anything right now. This is just our development server so quick little "let's see if this bean works now" deployments are all we are after. I would like it to 'refresh' after I deploy a new EJB.

            • 3. Re: Hot Deploy not Deploying, sort of
              Scott Stark Master

              There is no caching of anything across deployments you will have to explain what is not working and validate that this feature is in fact isolated to the deployment.

              • 4. Re: Hot Deploy not Deploying, sort of
                Dave Pagel Newbie

                it acts more or less like hot deployment is not on. Hopefully that's a better explanation.

                I only use 'caching' as an adjitive...I don't mean that's exactly what's goin' on :)

                • 5. Re: Hot Deploy not Deploying, sort of
                  Scott Stark Master

                  This does not help and since you already said the log shows the redeployment has happened you'll have to explain how you have validated that the redeployment has not been done as expected.

                  • 6. Re: Hot Deploy not Deploying, sort of
                    Dave Pagel Newbie

                    I think I figured it out.

                    For the problem:
                    A bean has a method with an output "foo 1"

                    I load the client and the call to that bean's method returns "foo 1"

                    Then I go into the bean and change "foo 1" to "bar 34"

                    I redeploy the bean.

                    Reload the client and the call to the method returns "foo 1", but with a restart of the server, it would return "bar 34"

                    Alright, as for what I think it was...I was working (on a seperate project) on calling one EJB from another. The autodeploy worked as normal for the first couple of times, then it stopped. So I removed the bean that calls the second bean, restarted the server one more time and wallah! works again.

                    • 7. Re: Hot Deploy not Deploying, sort of

                      That's true. Hot deploy doesn't seem to be working all the times. Even we have faced the same issue with hot deploy. Though the server says (from the log), that it undeployed the bean, it actually doesn't seem to be doing so.

                      We've tried to look around, and found some stuff in the tmp directory, under directory. The tmp directory has deploy directory under which there are many jar files. You would see your ejb jar file with a name tmpxxxx.jar (for example tmp1990ejbtestbean.jar).

                      If you do a jar tvf on this jar, you would find the bean classes in it. Now, if you compile another version of your bean and put it in the deployment path, the server would redeploy it. While redeploying, it tries to delete this tmp1990ejbtestbean.jar from that directory (sometimes it fails to delete this file). After the redeployment, another temp file is created, for example like: tmp2000ejbtestbean.jar. I guess this is where the problem is. If it's not able to delete the earlier temp file, it doesn't update the bean information (or whatever it is). In this case, I see multiple tmpbeanjar files for the same bean in this directory.



                      • 8. Re: Hot Deploy not Deploying, sort of
                        Scott Stark Master

                        Content in the tmp directory has no bearing on redeployment. Its a win32 issue that this cannot be deleted on redeployment due to locks held by resource lookups.

                        • 9. Re: Hot Deploy not Deploying, sort of
                          Jochen Riedlinger Newbie

                          I have the problem that I have an .ear-file referencing another .ear-file.
                          Each of the .ear-files has it's own loader repository configured via the jboss-app.xml and parent delegation is set to false. Futhermore in the ear-deployer.xml the isolated and the callbyvalue attributes are set to true.

                          For calling the ejb in the second .ear-file I use a "framework" utility jar file, containing the code for the lookup:
                          public EJBHome findEJBHome(String jndiName, Class toNarrow) {
                          try {
                          Object obj = context.lookup(jndiName);
                          return (EJBHome) PortableRemoteObject.narrow(obj, toNarrow);...........

                          This framework.jar is placed in the deploydirectory, so that all my appications can use it.

                          But with this proceeding hot redeployment doesn't work; only the first deployment try works out.

                          Although I read the classloading chapters in the WIKI several times I don't understand why my application can't find the ejb anymore after I redeployed it.

                          Is there a possibilty to clear the "memory" so that I don't try to use the old version anymore?