2 Replies Latest reply on Nov 10, 2003 4:53 PM by Stephen Jacobs

    CMP Issue with Fake M:N using 3 Beans

    Stephen Jacobs Newbie

      I am trying to setup an M:N relationship with three beans like the Roman book suggests.

      I am pretty much following the book's example and have updated it based on some suggestions I have found in this forum. I still can't get it to work though.

      When deploying my "middle-man" bean, I am getting a deployment error that says it can't find one of the beans in the relationship. The bean that it can't find is in a different .jar file and different package, but it has already successfully been deployed, which I can verify with a unit test.

      Is there anything that I need to do to further qualify that part of the <ejb-relationship> ? There are no bean name typos or anything stupid that I can see, but I figured I might be missing something?

      I have successfully done 1:N relationships many times, but this is my first time with M:N and I can't get past this error. I have considered moving the class in question into the same .jar and package just for grins, but thought I would drop a note to the group first.

      Any suggestions are welcome!

      Stephen J.

        • 1. Re: CMP Issue with Fake M:N using 3 Beans
          Raja Master

          Maybe your dependent jar is loaded before the other jar file. Try having a depends clause in ur jboss.xml of the middle-man bean.

          Or pack your dependent jar(the middle-man) as an ear. JBoss by default loads all the jars and then the ears. So by the time it gets to your middle-man, the other bean would have been loaded.

          The unit test may not give you an accurate picture as you cannot really find out if the dependent jar got loaded before/after the other bean.

          -Raj

          • 2. Re: CMP Issue with Fake M:N using 3 Beans
            Stephen Jacobs Newbie

            Further research has shown me that I have a more general problem. I cannot successfully create a CMR relationship with beans that are defined in other ejb-jar files. Is this an invalid thing to do?

            I have another post I just put up with more details, but I wanted to rename the topic since the problem was more general than an M:N problem.