5 Replies Latest reply on May 8, 2007 8:45 AM by damatrix

    Two war files with the same code base

    hvram

      Hi
      For the purpose of development our team uses Seam 1.2.1 . So we generally change the name of the project and thus create 2 different WAR files and then deploy them to the same jboss server .

      While I was trying to debug using the java remote debugger I found that I was hitting the break points of my colleague.

      This brings me to the question :
      a) Is this style of development acceptable (i.e. 2 WARs with the same class names etc ) . If not what is the preferred method of development ?

      b) If java does get confused with the class names as I can see the debugger hitting this problem will Seam have the same problem ?

      --Regards
      Hari

        • 1. Re: Two war files with the same code base
          vralev

          Are you using the flat classloader hack?

          • 2. Re: Two war files with the same code base
            hvram

            Hi
            I am assuming you are referring to the Isolation and CallByAttribute values in the ear-deployer.xml

            It was false . I set both the values to true and it still did not make any difference .

            Should I also set the use JBossWebClassLoader to true in the jboss-service.xml ( It is false now ? )


            Regards
            Hari

            • 3. Re: Two war files with the same code base
              vralev

              No, I just thought that the flat classloader might have caused it somehow. I think that the breakpoints are stored in your IDE and not in the binary, so it's hard to imagine how that happened. Are you sure you are not hitting your own breakpoints in the other app or the line numbers are out of sync?

              • 4. Re: Two war files with the same code base

                Just in case it helps: some time ago I had the following issue on my todo-list, to be posted here...

                I ran into trouble deploying two similar codebases like you described (two quite similar versions of my application). When Seam was starting the second WAR, it complained that two components with the same name and precedence were found. Thus: it looked like Seam also found the components from the first WAR file.

                However, when I got to the todo-item I could not reproduce the problem before posting here, so I thought I had just been imaging it... I don't know what the "flat classloader hack" is, so I did not use that, as far as I know...

                Arjan.

                • 5. Re: Two war files with the same code base
                  damatrix

                  I have also deployed an EAR with 2 WARs using the same EJB-JAR.

                  I do not have any problem since i use the loader hack. However i find that the JBOSS console gives me a warning that only one seam listerner should be defined for an application.

                  I want to find out what repercursions there are with this approach to the development & deployment of any application.