2 Replies Latest reply on Dec 16, 2002 8:37 AM by nicolas

    Transactional context of ejbRemove, SessionSynchronization

    nicolas

      Hello

      Version: JBoss 3.0.4. I have written a SFB with associated remote interface where the client is supposed to begin a UserTransaction before calling a sequence of business methods. When the client commits, I want to make sure the last business method has been called by checking a state variable of the session bean, and depending on the state, initiate a rollback. Therefore, I have implemented SessionSynchronization.

      Now the problem I encounter:

      The container calls the ejbRemove method in its own transactional context and also calls the three methods of SessionSynchronization I implemented in my bean. I have not found anything concerning this topic in the EJB2.0-Spec, nor do I, as a beginner with JBoss, quickly find the right place to look at in source code. Is the transaction, withing which ejbRemove gets called, according to specs? Is there a way to tell that the method afterBegin() was called while attempting to remove the bean and not within a business method or an explicit UserTransaction?

      Thank you very much for your help.

        • 1. Re: Transactional context of ejbRemove, SessionSynchronizati
          nicolas

          Hello once more

          I've just noticed in Monson-Haefel, Appendix B, Figure B-9, that the state transition from "Method ready" to "Does Not Exist", as it appears to me, is not associated with a transaction. If this Figure is considered as spec, then the way JBoss 3.0.4 actually works is not according to spec.

          Thank you once again. Nicolas

          • 2. Re: Transactional context of ejbRemove, SessionSynchronizati
            nicolas

            Hello once more

            I've just noticed in Monson-Haefel, Appendix B, Figure B-9, that the state transition from "Method ready" to "Does Not Exist", as it appears to me, is not associated with a transaction. If this Figure is considered as spec, then the way JBoss 3.0.4 actually works is not according to spec.

            Thank you once again. Nicolas