6 Replies Latest reply on May 19, 2010 8:43 AM by Max Rydahl Andersen

    Deployment problems

    Johannes Krämer Newbie

      Hi,

       

      I'm using JBoss AS 5.1 and ESB 4.8 together with the JBoss Tools Server Adapter for controlling the server in Eclipse (JBoss 5.1 Runtime Server). The adapter works fine for starting and stopping the server, however, there are some strange problems when it comes to deployments:

       

      - Dynamic Web Projects and ESB projects are not updated when I choose incremental publish. Although they are marked as "Synchronized" after an incremental publish, any changes at the code would only work after I do a full publish.

       

      - With EJB projects (without EAR) things are even worse, as any code changes after the first deployment would only be effective after removing and republishing the project (incremental as well as full publish simply does nothing in that case).

       

      - But the biggest problem are jBPM projects, because they don't publish at all. It doesn't depend on the type of publishing (full or incremental), the process just doesn't show up in the jBPM console. However, if I deploy an exported .par file manually, it works fine.

       

      Am I doing anything wrong or could this be some bug?

       

      Kind regards

       

      Johannes Krämer

        • 1. Re: Deployment problems
          Max Rydahl Andersen Master

          Web projects most definitely should just be updated incrementally. Would need to know more.

           

          ESB projects similar, but could be a bug (since its newer code base than the good old Web deploy)

           

          EJB projects - are the files actually not updated in the deployment ? I'll assume they are and the problem you are seeing is that EJB's aren't dynamically reloadable. They require a restart of the module. Maybe the same issue you see for the web projects ?

           

          jbpm projects have their down deployment approach at the moment. Are you using the jbpm deployment tab or copying a .par file or how ?

          • 2. Re: Deployment problems
            Johannes Krämer Newbie

            Thanks for your answer. I've further examined the problems:

            Web projects most definitely should just be updated incrementally. Would  need to know more.

            I've created a servlet which I access through http://localhost:8080/test-client/TestClient1. When I update it (e.g. change an output String) and do an incremental deployment, the class at server\default\deploy\test-client.war\WEB-INF\classes is updated (I can see the modified String when I open the class in an editor), but the server still gives me the old version, even if I use a browser, who never opened this site (to avoid cache problems).

            If I do a full publish, everything works fine and I can see the new ouput.

             

            ESB projects similar, but could be a bug (since its newer code base than  the good old Web deploy)

            ESB projects seem to work now, for whatever reason.

            EJB projects - are the files actually not updated in the deployment ?  I'll assume they are and the problem you are seeing is that EJB's aren't  dynamically reloadable. They require a restart of the module. Maybe the  same issue you see for the web projects ?

            Yes, just like with the web project, the files are updated in the deployment folder but the EJB still sends the same output as before the update.

            There seems to be no way to restart the ejb-module through eclipse, the corresponding entries (Start, Stop, Restart) in the server adapter's context menu are greyed out. Should it really work like <right click> - <remove> - <right click> - <add and remove> - <add the module> - <OK> every time I make an update to an EJB?

            jbpm projects have their down deployment approach at the moment. Are you  using the jbpm deployment tab or copying a .par file or how ?

            I right click the processdefinition XML file, and chose "Make Deployable". In Eclipse's server view, I can than see an entry "/test-jbpm/testProcess/processdefinition.xml" under "JBoss 5.1 Runtime Server", but there's no entry in the jbpm-console.

            The same goes for using the deploment tab of the process with the settings "localhost, 8080, /jbpm-console, admin, admin". It gives me "The server connection was successfully tested" and "The process archive deployed successfully", but still no console entry.

            If I create a .par-file using the deploy tab ("Save without deploying") and deploy it manually through the jbpm-console, everything works fine.

            • 3. Re: Deployment problems
              Rob Stryker Master

              From my experiences testing, full publish only ever fails if your deployment (such as an EJB) has no xml descriptor defined. The JBoss runtime seems to have difficulty noticing changes if there are no xml descriptors in the deployment.

               

              I recognize this as a significant downfall, but I've been unable to find any way to push to the runtime that these changes have occurred. THe workaround that I've found is to include the non-required xml descriptor in your project so that the App server can actually recognize the change.

              1 of 1 people found this helpful
              • 4. Re: Deployment problems
                Johannes Krämer Newbie

                From my experiences testing, full publish only ever fails if your  deployment (such as an EJB) has no xml descriptor defined. The JBoss  runtime seems to have difficulty noticing changes if there are no xml  descriptors in the deployment.

                Thanks a lot. With a deployment descriptor stub, full publish of the EJB works. Incremental publish still doesn't work, but at least I don't have to remove it every time.

                • 5. Re: Deployment problems
                  Rob Stryker Master

                  Currently the server is unable to load changed .class files in most projects. I believe only Seam projects can quickly reload seam projects. This is not a tooling issue primarily but is more a runtime issue.

                   

                  I've considered adding a workspace setting to allow (or disallow) touching of xml files when a .class file is changed, but so far I haven't moved on this issue because demand really isn't that huge for it.

                   

                  I probably should just make 'restart' go through and touch all descriptors.     

                  • 6. Re: Deployment problems
                    Max Rydahl Andersen Master

                    We know which type of descriptor to touch per deployment type so no real need to scan for *all* to make it happen.

                     

                    There is a "Touch" button in the toolbar that will do this.