3 Replies Latest reply on Apr 7, 2004 5:10 AM by adrian.brock

    Problems removing EJBs

    aaron

      Im having trouble with some ejbs that I remove in the context of a transaction. And i was hoping someone could shed some light as to what is going on, and hence steer me in the right direction.

      When a Address ejb is removed, i am wanting to update another record related to this. What i have been doing is calling a refresh method after this (but still within the same transaction). This method does a search and finds all Addresses, and performs some operations on them..

      However my problem is, it seems that when i perform the remove, and then get all Addresses I am returned the ejb that has been set to be removed. I then make use of that address ejb and I think due to this i am receiving the below error. To the best of my knowledge I don't have any other processes running or anything (this is a junit test im running).

      And because of this I think i am receiving this error message:
      javax.ejb.EJBException: Reentrant method call detected for Address 775: The same thread reentered: thread=Thread[RMI TCP Connection(2)-10.66.32.33,5,R
      MI Runtime], tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=chmapc_aaronc//30, BranchQual=]
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:108)
      at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invoke(EntityMultiInstanceInterceptor.java:108)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)


      Is there a way to check to see if an ejb has been marked for removal ?


      any help is appreciated
      cheers
      --Aaron

        • 1. Re: Problems removing EJBs
          aloubyansky

          The instance is not removed until after ejbRemove returns. So it looks like application problem.

          • 2. Re: Problems removing EJBs
            aaron

            Any ideas what is wrong with my code ?

            Or where i could start looking...

            I've tried to step through the code working out where my re entrant method is getting caught and what the method call is from. But i keep getting lost in the EntityProxy and HttpLocalProxy. Other than what is wrong with my code, is there a good way to approach server side debugging? Where i can see everything thats going on.

            thanks once again for the help
            --Aaron

            • 3. Re: Problems removing EJBs

              Post the full stacktrace.

              The message says you are trying to re-enter the bean instance when you are
              already in it.
              i.e.
              client -> bean -> probably something inbetween -> bean

              You don't have it marked as reentrant in your ejb-jar.xml

              Regards,
              Adrian