3 Replies Latest reply on Nov 5, 2005 5:26 PM by rdewell

    Problem with multiple ejb3 and war

      Hi,

      I'm working at an application with many modules. In our .ear archive was more that one ejb3 or war file. I have configured seam for 2 war modules.
      On deployment Seam are parsing all ejb3 archives with seam.properties inside, and this is happen for both war applications. An of course will find the same beans. How ca-n I limit the packages parsed by seam for one war module? What is happen if I have a bean with the same name in two ejb3 files? What bean is first bind ?


      Cristi

        • 1. Re: Problem with multiple ejb3 and war
          gavin.king

          You will need to segment the classloaders in some way. An obvious way is to use two seperate ears, but there are probably other ways to do this in JBoss. I don't know them.

          • 2. Re: Problem with multiple ejb3 and war

            Hi,

            Thanks for answer,

            Using seaparate ears is a solution.
            In this case I need to create a very complicate packaging and deploy procedure. And I'm going into deploy order problem. Becouse I have classes what are shared in application.

            Maybe will make a parameter to specify java packaging to scan by seam. Is possible ?

            Cristi

            • 3. Re: Problem with multiple ejb3 and war
              rdewell

              RE: You will need to segment the classloaders in some way.

              I'm running into some trouble with this myself. Two .ejb3's, and two .war's in the same ear (and one par). It deploys ok, but the following odd behavior is observed:

              - Access app 1, OK.
              - Access app 2, OK.
              - Access app 1 (again), failure. It's looking for resources that are within app 2... For example, a resource bundle.

              It's almost like on the second time app 1 has been run, AFTER app 2 has been accessed, app 1 thinks it is .... I have no idea.

              Is this the same deal with the classloaders? Is this even a Seam issue at all?

              Thanks,

              Ryan