7 Replies Latest reply on Mar 26, 2010 10:24 AM by peterj

    Difference between JBoss and Tomcat

      Hi all,

       

      I'm totally new to the JBoss community and the JBoss AS. I'v primarly worked with Tomcat before and would be very greatful if anybody could clarify how the War file and exploded war works in JBoss since I'm a bit confused regarding this at the moment.

       

      My experience from Tomcat is that you can build a war-file, put it in the webapps directory and it will either unpack it in the webapps dir directly (hot deployment) or do it after a restart of the server. If I then want to edit or replace any part of my webapp I simply edit/overwrite the jsp's, lib's or js files in the unpacked web application directory under webapps. If I want to make a new fully redeployment from a new war file I simply delete the directory (maybe clear the works folder) and restart the server. Very nice and I worked like this during the last four years.

       

      Now, over to JBoss. If I create a war file and put it in server/default/deploy , restart the server it will be deployed. But no exploded folder is created except for the one in the work directory. I would expect to see an exploded directory outside of the work directory, maybe even as a subdirectory to the deploy folder. I googled this and it looks like you will have to make a choice with JBoss. You either always deploy a war file or you copy the exploded directory to the deploy folder. This sounds very strange to me since JBoss (all respect to Tomcat) is a much greater product than Tomcat.

       

      Please tell me that I have gotten this totally wrong and give me a description of how war deployment and file editing in an exploded directory is supported in the JBoss application server. Btw, I'm using the 4.2 version of JBoss at the moment.

       

      greatfull for any help

      /Andreas

        • 1. Re: Difference between JBoss and Tomcat
          peterj

          >>. You either always deploy a war file or you copy the exploded directory to the deploy folder.

          You have not got it wrong, this is the way it works. See

          http://community.jboss.org/wiki/ExplodedDeployment

          • 2. Re: Difference between JBoss and Tomcat

            Thank you for your quick answer. I really hoped that I was missing something. So, all you experienced JBoss developers, which way is the best in JBoss? Full deployment of war file or copy of an exploded directory. Or is there maybe another way of deployment that is supported in JBoss?

             

            /Andreas

            • 3. Re: Difference between JBoss and Tomcat
              peterj

              For development, I prefer exploded deployment. For production,, it depends on your requirements. There have been numerous posts in the forum where the  use exploded deployment met the poster's requirements.

              • 4. Re: Difference between JBoss and Tomcat

                I absolut agree on using exploded deployment for development. I'm actually using  a softlink in the deploy folder at the moment which point to my source code. But I would prefere having a war file when doing full deployments to a test, staging or prod server. But this is not an option if I can't do any changes to any file without doing a new full deployment again. I guess I will have to do a complete file/folder copy to the deployment directory and just leave out the war file creating part from now on. Feels a bit strange since I havn't done any file/folder copy installations for the past 5-7 years.

                 

                Are there any tools/technics/plug-ins that are commonly used in the JBoss community to support the exploded deployment process.

                 

                /Andreas

                • 5. Re: Difference between JBoss and Tomcat
                  peterj

                  >>Are there any tools/technics/plug-ins that are commonly used in the  JBoss community to support the exploded deployment process.

                  No, the only tools available work only with archive files, not with exploded directories. I usually package everything inside a zip file and provide an Ant script to do the deployment.on the test/production machines.

                  • 6. Re: Difference between JBoss and Tomcat

                    Looks like you are an experienced developer Peter. Have you used any of the other big applications servers like Weblogic, Websphere or GlassFish. Is it same thing there that they don't support editing files deployed using war file?

                     

                    /Andreas

                    • 7. Re: Difference between JBoss and Tomcat
                      peterj

                      I have played with all three, but tt was a long time ago. I recall with websphere that trying to figure out where your app actually went after being deployed was interesting. In general none gives the ability to modify archive file contents - you must replace the entire archive file. I do not recall what support they might have had for exploded deployment.

                       

                      Also, I recall that there is some effort to support exploded deployment with the admin console. You still have to give the admin console an archive file, but after it downloads the file it will explode the file before deploying it.